This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
More Q's on symbol versioning
- To: binutils at sourceware dot cygnus dot com
- Subject: More Q's on symbol versioning
- From: Bharadwaj Yadavalli <sby at ives dot lkg dot dec dot com>
- Date: Tue, 20 Jun 2000 09:56:06 -0400 (EDT)
- Reply-To: sby at ives dot lkg dot dec dot com
Can someone kindly clarify the following for me, please?
I stmbled across this dilemma as I am trying to understand
the semantics of the contents of the section of type
SHT_GNU_versym.
Let versym be the Elfxx_Half typed value in the array that
forms the section contents. The following seems to be the
meaning of versym from what I see in bfd_elf_print_symbol -
(I don't claim to be very strong on the BFD'isms but I am
fairly confident of their mapping to ELF in my mind).
vernum = (versym & VERSYM_VERSION);
if vernum < no. of version definitions (as noted in sh_info field
of .gnu.version_d & in DT_VERDEFNUM in .dynamic)
the version of the symbol is indicated by version
definition whose vd_ndx value is vernum.
else
the version information of the symbol is indicated by the
verneed entry whose vna_other value is vernum.
But the comment against the field vna_other in the
definition of Elfxx_Vernaux (in elf.h) says it is unused (as
is the case in the Sun's Linker and Library Reference
document). If the contents of this field are being used,
what are its semantics? Also, Ulrich Drepper's note that I
found on Cygnus website has the sentence "The values in the
symbol version table entries are the vna_other values from
the definition of the required versions". But vna_other is
unused... or is it not?
In essence, is my above understanding correct? If so, can
you kindly tell me the semantics of vna_other? Is it correct
to say that vna_other is the index of the version dependency
used by symbol version and correct the comment in the
sources accordingly?
Thanks in advance for your time and kind help.
Regards,
Bharadwaj