Use dlmopen() instead of dlopen() when supported
Currently we dlopen() the plugin, which potentially means loading a lot of symbols into the global namespace of the executable. This may be problematic if incompatible statically linked symbols are already loaded. Currently this is mitigated by allowing plugins to check what symbols shouldn't yet be loaded, and if so bail out, but eventually, a better solution is needed. Using dlmopen()
would solve this, but for the GTK plugin, this isn't yet possible duo to an issue in glibc. Once the glibc issue is solved, we should use dlmopen()
instead of dlopen()
, on stdandard C libraries that supports it.