Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 993
Danny Dulai Avatar asked Aug 06 '11 03:08

Danny Dulai


2 Answers

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

like image 117
Employed Russian Avatar answered Sep 28 '22 20:09

Employed Russian


It sounds like you want dlmopen.

like image 43
o11c Avatar answered Sep 28 '22 20:09

o11c