diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-10-10 17:01:49 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-10-10 17:01:49 +0000 |
commit | 56d86168720849e94cb39809a29e7c391300460d (patch) | |
tree | 7cd89de0c31570ee053af34439fddf515ac0237f /lib/Support/PluginLoader.cpp | |
parent | 2d6a2360036cf511af0a06f9720e6a1752779d1c (diff) |
Change to use LinkDynamicObject instead of dlopen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/PluginLoader.cpp')
-rw-r--r-- | lib/Support/PluginLoader.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Support/PluginLoader.cpp b/lib/Support/PluginLoader.cpp index 76c5e8197d..4cacd01613 100644 --- a/lib/Support/PluginLoader.cpp +++ b/lib/Support/PluginLoader.cpp @@ -10,6 +10,7 @@ // //===----------------------------------------------------------------------===// +#include "Support/DynamicLinker.h" #include "Support/CommandLine.h" #include "Config/dlfcn.h" #include "Config/link.h" @@ -18,9 +19,10 @@ namespace { struct PluginLoader { void operator=(const std::string &Filename) { - if (dlopen(Filename.c_str(), RTLD_NOW|RTLD_GLOBAL) == 0) - std::cerr << "Error opening '" << Filename << "': " << dlerror() - << "\n -load request ignored.\n"; + std::string ErrorMessage; + if (LinkDynamicObject (Filename.c_str (), &ErrorMessage)) + std::cerr << "Error opening '" << Filename << "': " << ErrorMessage + << "\n -load request ignored.\n"; } }; } |