Search code examples
linuxmacoslinkerelfmach-o

Mach-O's two-level namespace symbol resolution in ELF/linux


Anyone know of an equivalent to Mach-O's two-level namespace symbol resolution in ELF/linux? I want code that links to lib+sym, not sym.

I'm trying to do what could best be described as precompilation of what normally would be a JIT compilation. I'd like to get a compile time binding of symbols, that normally would be done by a dlopen/dlsym. However, there could be collisions, which are nicely avoided by the dlopen/dlsym.

It seems that ELF actually lacks this, and there is the VERSION stuff, but any workarounds or suggestions would be appreciated.


Solution

  • There is no ELF equivalent (and usually one isn't needed).