open plugins with RTLD_GLOBAL, pointed out by Bram Adams.

llvm-svn: 53385
This commit is contained in:
Chris Lattner
2008-07-10 00:52:20 +00:00
parent d977c07680
commit 2e24e0ca68

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();