Conceptually, yes. Practically, is there a reason why ELF symbol versioning needs to be this complicated beast requiring non-trivial loader support instead of, well, the trivial name hack being proposed here (and already used, among other places, in Musl for time64 support)? I’m honestly curious, I’ve read Drepper’s description[1] multiple times and I still can’t figure out the “why” of the whole thing.
ETA: Hmm, maybe semantic interposition / the global namespace of ELF dynamic linking is at fault here? As in, if a shared object declares an import of printf and a glibc version, it should get printf@@GLIBC_whatever if the import actually ends up being from glibc but plain printf otherwise? Not sure that’s a good interpretation of what versioning should mean in this context but it’s a possible one that would force this unpleasantness.
[1] https://www.akkadia.org/drepper/symbol-versioning
ETA: Hmm, maybe semantic interposition / the global namespace of ELF dynamic linking is at fault here? As in, if a shared object declares an import of printf and a glibc version, it should get printf@@GLIBC_whatever if the import actually ends up being from glibc but plain printf otherwise? Not sure that’s a good interpretation of what versioning should mean in this context but it’s a possible one that would force this unpleasantness.