* 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. > 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-) The musl dynamic loader does not support symbol versioning (of either kind), but binutils targeting for musl still has support for it because there isn't really a separate non-GNU target for musl, which means that some run-time tests involving symbol versions will fail. (musl doesn't want to identify as musl in its headers, so it's not really possible to write a straightforward compile-time check for this, but maybe the GCC build process already has this information from somewhere else.) Thanks, Florian