* Rainer Orth:

> Florian Weimer <fwei...@redhat.com> writes:
>
>> * Rainer Orth:
>>
>>> Hi Jan,
>>>
>>>> Also I wonder for testsuite bits, I think I need to implement
>>>> dl-require-symver and then use it to gate the individual tests? Or do we
>>>> have some common way to check for ELF?
>>>
>>> there's a misunderstanding throughout here: symbol versioning is *not* a
>>> (generic) ELF feature, i.e. it is not part of the ELF gABI.  Instead it
>>> started off as a Solaris extension initially, later to be adopted and
>>> extended again by gas/gld/glibc.
>>
>> The GNU implementation is incompatible at a conceptual level, it's not
>> just an extension.
>
> Huh?  The gld manual claims otherwise:
>
> https://sourceware.org/binutils/docs/ld/VERSION.html#VERSION
>
> and the ELF representation is certainly the same.  Check
>
> https://docs.oracle.com/cd/E37838_01/html/E36783/chapter5-84101.html#scrolltoc
>
>>> There are certainly ELF platforms that don't support it at all
>>> (cf. HP-UX in gccinstall, maybe some of the BSDs, historically even
>>> more like IRIX), so you cannot assume that any ELF platform will
>>> support it.  On top of that, the GNU extension of having the same
>>> symbol in multiple versions was never taken up by Solaris (and never
>>> will be AFAICT), so even when using gas and gld, uses will break when
>>> they reach ld.so.1.
>>
>> I think symbols don't carry versions in Solaris, which is the conceptual
>> difference. 8-)
>
> Huh again: you can certainly bind a symbol to a particular version (just
> one though) using linker scripts which use exactly the same format as
> gld (minus support for C++ mangling and globbing).

Ahh, sorry, I looked at this from the dynamic linker perspective.  I
still think the Solaris link editor uses those tables to map symbols to
versions.  But the correspondence is gone when loading.

The question is to what extent does this matter for .symver support in
GCC?  Does Solaris support a way to encode versioned symbol definitions
in ET_REL files?

Thanks,
Florian

Reply via email to