The RTLD_GLOBAL flag allows symbols to be globally accessible, which makes
authorMisha Brukman <brukman+llvm@gmail.com>
Mon, 28 Jul 2003 19:19:58 +0000 (19:19 +0000)
committerMisha Brukman <brukman+llvm@gmail.com>
Mon, 28 Jul 2003 19:19:58 +0000 (19:19 +0000)
resolution of symbols in the .so possible (currently assists debugging with
bugpoint).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7366 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/PluginLoader.cpp
support/lib/Support/PluginLoader.cpp

index b973b16a508cecf7aa5d334b92d6156146774620..76c5e8197df4bbd00294760026fb18aa1138ca30 100644 (file)
@@ -18,7 +18,7 @@
 namespace {
   struct PluginLoader {
     void operator=(const std::string &Filename) {
-      if (dlopen(Filename.c_str(), RTLD_NOW) == 0)
+      if (dlopen(Filename.c_str(), RTLD_NOW|RTLD_GLOBAL) == 0)
         std::cerr << "Error opening '" << Filename << "': " << dlerror()
                   << "\n  -load request ignored.\n";
     }
index b973b16a508cecf7aa5d334b92d6156146774620..76c5e8197df4bbd00294760026fb18aa1138ca30 100644 (file)
@@ -18,7 +18,7 @@
 namespace {
   struct PluginLoader {
     void operator=(const std::string &Filename) {
-      if (dlopen(Filename.c_str(), RTLD_NOW) == 0)
+      if (dlopen(Filename.c_str(), RTLD_NOW|RTLD_GLOBAL) == 0)
         std::cerr << "Error opening '" << Filename << "': " << dlerror()
                   << "\n  -load request ignored.\n";
     }