https://sourceware.org/bugzilla/show_bug.cgi?id=33577
--- Comment #34 from Fangrui Song <i at maskray dot me> --- Michael on the binutils mailing list pointed out that an old document from Solaris https://shrubbery.net/solaris9ab/SUNWdev/LLM/p45.html doesn't mention version index (0) for unversioned undefined symbols. Citing a Solaris specification is not convincing, given that the GNU ld versioning scheme was implemented in the 1990s and its subsequent evolution and divergence from the original design are unclear. However, in practical testing using a 2019 GNU ld version (before sourceware.org/PR26002 , I forgot that I had reported this issue), I observed that it produced index 0 for unversioned undefined symbols in several manually crafted cases. --- The GNU and Linus Standard Base documentation is ambiguous about the version index for unversioned undefined symbols. The current specification at sourceware.org/gnu-gabi/program-loading-and-dynamic-linking.txt defines VER_NDX_LOCAL (0) as "The symbol is private, and is not available outside this object." However, this naming is misleading for undefined symbols. As suggested in discussions, VER_NDX_LOCAL should conceptually be VER_NDX_NONE and apply to unversioned undefined symbols as well. However, this alone does not justify the GNU ld producer change. GNU ld has used index 0 for unversioned undefined symbols both before version 2.35 (see sourceware.org/PR26002 in 2020) and in the upcoming 2.46 release (see sourceware.org/PR33577). Therefore, I think it makes sense for other ELF linkers to adopt index 0 for unversioned undefined symbols. -- You are receiving this mail because: You are on the CC list for the bug.
