wxDllLoader::loadLibrary, dlopen called w/o RTLD_GLOBAL
|Reported by:||anonymous||Owned by:||vadz|
|Keywords:||Cc:||vadz, jice_vwaty_com, mbrubeck|
This might be considered a bug or a feature request; not
What happens is that when HAVE_DLOPEN is defined,
wxDllOpen(lib) expands as:
This is fine in many cases but not all: if more than
one lib is loaded, and if one lib has undefined
symbols that are supposed to be resolved by another
library previously loaded, this resolution will not be
performed, unless the first library was loaded as follows:
In other words, if the symbol table of the first library
was merged in the executable's symbol table.
In many such cases, libraries reference each other explicitly and so dlopen loads automatically all the other
libraries required, and performs symbol resolution at
that time. However, I know of at least one library that
depends on another without mentioning it: libssl.so
needs libcrypto.so. As a result, an application such
as Mahogany fails to load libssl.so, eventhough it takes
care of loading libcrypto beforehand.
May be setting the RTLD_GLOBAL flag in all cases would have
known adverse effects that I am not aware of, in which case
my proposal is to add a member function such as
LoadLibraryGlobal() to the wxDllLoader class.