open plugins with RTLD_GLOBAL, pointed out by Bram Adams.
authorChris Lattner <sabre@nondot.org>
Thu, 10 Jul 2008 00:52:20 +0000 (00:52 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 10 Jul 2008 00:52:20 +0000 (00:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53385 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/DynamicLibrary.cpp

index 572ba496e191451d201a7c9cd3195911f8909fab..5e3b6cb56511aea80d05974569318f3f6245c9ff 100644 (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();