I'm building a compiler and a virtual machine for executing my byte code. The language allows to bind external C functions, which may be defined in some external shared object, as well as the main compiler/VM binary (some essential language built-ins).
I know I can dynamically bind symbols within the main executable with dlopen(NULL, ...), however NOT after I run strip
on the binary. I have the following questions then:
Use strip -d
instead to only strip debug symbols.
The dlopen(3)
man page says:
CONFORMING TO POSIX.1-2001 describes dlclose(), dlerror(), dlopen(), and dlsym().
So, very portable across *nix.
Windows uses LoadLibrary()
and GetProcAddress()
instead.
No.