open plugins with RTLD_GLOBAL, pointed out by Bram Adams.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53385 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2008-07-10 00:52:20 +00:00
parent 7cc9a4b990
commit ae55e04d7a

View File

@ -61,7 +61,7 @@ DynamicLibrary::~DynamicLibrary() {
bool DynamicLibrary::LoadLibraryPermanently(const char *Filename,
std::string *ErrMsg) {
void *H = dlopen(Filename, RTLD_LAZY);
void *H = dlopen(Filename, RTLD_LAZY|RTLD_GLOBAL);
if (H == 0) {
if (ErrMsg)
*ErrMsg = dlerror();