One final comment. I read through the GetDllHandle() code that you posted:
// check for the ue4_module_options symbol|
const char **ue4_module_options = (const char **)dlsym(Handle, ue4_module_options);|
...
if (Option.Equals(FString(ANSI_TO_TCHAR("linux_global_symbols")), ESearchCase::IgnoreCase))
{
UpgradeToGlobal = true;
}
The above code suggests that you can declare the following global variable in your module:
__attribute__((visibility("default")))
const char *ue4_module_options = "linux_global_symbols";
According to the code you posted, GetDllHandle() will read this variable using dlsym(), and if the variable is set to “linux_global_symbols”, then GetDllHandle() will use RTLD_GLOBAL
.