unix - dlopen()/dlsym() on the main executable: how portable is it? -
i'm building compiler , virtual machine executing byte code. language allows bind external c functions, may defined in external shared object, main compiler/vm binary (some essential language built-ins).
i know can dynamically bind symbols within main executable dlopen(null, ...), not after run strip
on binary. have following questions then:
- is there way on strip'ed binary?
- how portable feature across unix systems in general?
- is possible same trick on windows somehow?
- any alternatives ways of binding dynamically within main executable?
use
strip -d
instead strip debug symbols.the
dlopen(3)
man page says:conforming posix.1-2001 describes dlclose(), dlerror(), dlopen(), , dlsym().
so, portable across *nix.
windows uses
loadlibrary()
,getprocaddress()
instead.no.
Comments
Post a Comment