[PATCH] elf: Update symbol versioning link and comments

H.J. Lu hjl.tools@gmail.com
Fri Nov 14 23:42:34 GMT 2025


Oracle Solaris 11.4 Linker and Libraries Guide:

https://docs.oracle.com/en/operating-systems/solaris/oracle-solaris/11.4/linkers-libraries/version-symbol-section.html

defines VER_NDX_LOCAL to 0 with a comment, "Symbol has local scope".  This
leads to different interpretations by different linker implementations.
However Solaris as well as ld and ld.so in glibc always treat symbols
with version index 0 as unversioned symbols, defined or undefined, without
making them a local symbol.  As discussed in

https://sourceware.org/bugzilla/show_bug.cgi?id=33577

in hindsight, VER_NDX_NONE might be a better name.  Ali from Oracle is
working on clarifying what version index 0 really means for unversioned
symbols, defined or undefined, with global visibility.  In the meantime,
update symbol versioning comments.

PR ld/33577
* elf/common.h (VER_FLG_BASE): Update link to Oracle Solaris
11.4 Linker and Libraries Guide.
(VER_NDX_LOCAL): Add comments.
(VER_NDX_GLOBAL): Likewise.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-elf-Update-symbol-versioning-link-and-comments.patch
Type: text/x-patch
Size: 2698 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20251115/778c361f/attachment.bin>


More information about the Binutils mailing list