mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Revert "Limit the symbol search in DynamicLibrary to the module that was opened."
This reverts commit r216563, which breaks lli's dynamic symbol resolution. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216569 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
95141f9379
commit
0927dab0be
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user