https://sourceware.org/bugzilla/show_bug.cgi?id=33577
--- Comment #27 from H.J. Lu <hjl.tools at gmail dot com> ---
As the first step, we should clarify exactly what version index 0,
VER_NDX_LOCAL,
means. Currently both ld and ld.so in glibc don't treat version index 0 as
hidden
visibility. In ld, only ia64 has local dynamic symbols:
[hjl@gnu-tgl-3 ia64]$ readelf -VDsW local1.so
Symbol table for image contains 4 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 0000000000000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000000001f0 16 FUNC LOCAL DEFAULT 7 hidden
2: 0000000000010348 8 OBJECT GLOBAL DEFAULT 10 foo@@VERS_1
3: 0000000000000000 0 OBJECT GLOBAL DEFAULT ABS VERS_1
Version symbols section '.gnu.version' contains 4 entries:
Addr: 0x000000000000018e Offset: 0x0000018e Link: 2 (.dynsym)
000: 0 (*local*) 0 (*local*) 2 (VERS_1) 2 (VERS_1)
Version definition section '.gnu.version_d' contains 2 entries:
Addr: 0x0000000000000198 Offset: 0x00000198 Link: 3 (.dynstr)
000000: Rev: 1 Flags: BASE Index: 1 Cnt: 1 Name: local1.so
0x001c: Rev: 1 Flags: none Index: 2 Cnt: 1 Name: VERS_1
[hjl@gnu-tgl-3 ia64]$
hidden is a local dynamic symbol with VER_NDX_LOCAL.
I think the spec should say something like that a global/weak
defined/undefined,
with version index 0 is a symbol without version.
--
You are receiving this mail because:
You are on the CC list for the bug.