summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/DynamicLibrary.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2014-08-27 17:51:43 +0000
committerZachary Turner <zturner@google.com>2014-08-27 17:51:43 +0000
commit74a46c24f3be4a8a758d9c9d3d838b8851cb010d (patch)
treeead815a0241fc1ce4b93da8c5700086f43359123 /llvm/lib/Support/DynamicLibrary.cpp
parent0717c3de026930504fd2850bb0544dd3cfd590c2 (diff)
downloadbcm5719-llvm-74a46c24f3be4a8a758d9c9d3d838b8851cb010d.tar.gz
bcm5719-llvm-74a46c24f3be4a8a758d9c9d3d838b8851cb010d.zip
Revert "Limit the symbol search in DynamicLibrary to the module that was opened."
This reverts commit r216563, which breaks lli's dynamic symbol resolution. llvm-svn: 216569
Diffstat (limited to 'llvm/lib/Support/DynamicLibrary.cpp')
-rw-r--r--llvm/lib/Support/DynamicLibrary.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/Support/DynamicLibrary.cpp b/llvm/lib/Support/DynamicLibrary.cpp
index 40072636608..d2b551e8a0a 100644
--- a/llvm/lib/Support/DynamicLibrary.cpp
+++ b/llvm/lib/Support/DynamicLibrary.cpp
@@ -56,15 +56,8 @@ static DenseSet<void *> *OpenedHandles = nullptr;
DynamicLibrary DynamicLibrary::getPermanentLibrary(const char *filename,
std::string *errMsg) {
SmartScopedLock<true> lock(*SymbolsMutex);
- int flags = RTLD_LAZY | RTLD_GLOBAL;
-#if defined(__APPLE__)
- // RTLD_FIRST is an apple specific flag which causes dlsym() to search only
- // the module specified in |filename|, and not dependent modules. This
- // behavior would be desirable for other platforms as well, except that
- // there's not a good way to implement it.
- flags |= RTLD_FIRST;
-#endif
- void *handle = dlopen(filename, flags);
+
+ void *handle = dlopen(filename, RTLD_LAZY|RTLD_GLOBAL);
if (!handle) {
if (errMsg) *errMsg = dlerror();
return DynamicLibrary();
OpenPOWER on IntegriCloud