The RTLD_GLOBAL flag allows symbols to be globally accessible, which makes

resolution of symbols in the .so possible (currently assists debugging with
bugpoint).

llvm-svn: 7366
This commit is contained in:
Misha Brukman 2003-07-28 19:19:58 +00:00
parent d36940e9ec
commit bbfad09fa9
2 changed files with 2 additions and 2 deletions

View 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";
}

View 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";
}