I am having a problem about a wrong symbol resolution. My main program loads a shared library with dlopen and a symbol from it with dlsym. Both the program and the library a
I suspect that there is a clash between two global symbols. One solution is to declare a
in the main program as static. Alternatively, the linux manpage mentions RTLD_DEEPBIND
flag, a linux-only extension, which you can pass to dlopen
and which will cause library to prefer its own symbols over global symbols.