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

--- Comment #29 from Ali Bahrami <ali_swbugzilla at emvision dot com> ---
(In reply to H.J. Lu from comment #27)
> 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.
...
> 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.


In my opinion, the only basis for treating a symbol
as hidden should be that it specifies hidden visibility
it it's st_other field, as extracted by ELF[32|64]_ST_VISIBILITY.
Similarly, the only basis for treating a symbol as local
is that it has STB_LOCAL visibility. The version may reflect
those things, but it doesn't determine them.

While symbols with VER_NDX_LOCAL are almost always local
(as opposed to globals that actually have hidden visibility),
we know there are other cases where it applies, as we've been
discussing. So I would say that index 0 is the index to be used
when no other version index applies. If I could go back to 1994
with this discussion fresh in my mind, I might suggest that
it be named VER_NDX_NONE.

I don't think we should rename it now of course, that
ship has sailed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to