explicit use flag RTLD_LOCAL with dlopen()

On OSX, `dlopen()` default to`RTLD_GLOBAL` while linux defaults to `RTLD_LOCAL`.
so on OSX, it can cause issue with false positively detecting shared library as statically linked, as was the case with `Play!`.
This commit is contained in:
Zer0xFF 2019-07-09 14:42:23 +01:00 committed by GitHub
parent e9b1a49c42
commit 04e9cef462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -120,7 +120,7 @@ dylib_t dylib_load(const char *path)
}
last_dyn_error[0] = 0;
#else
dylib_t lib = dlopen(path, RTLD_LAZY);
dylib_t lib = dlopen(path, RTLD_LAZY | RTLD_LOCAL);
#endif
return lib;
}