A patch from Stephen Wilson that fixes some issues with my previous dynamic
loader changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@125084 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Host/common/Host.cpp b/source/Host/common/Host.cpp
index 5458a91..ae0537b 100644
--- a/source/Host/common/Host.cpp
+++ b/source/Host/common/Host.cpp
@@ -673,6 +673,9 @@
if (options & eDynamicLibraryOpenOptionLazy)
mode |= RTLD_LAZY;
+ else
+ mode |= RTLD_NOW;
+
if (options & eDynamicLibraryOpenOptionLocal)
mode |= RTLD_LOCAL;
@@ -744,7 +747,7 @@
// This host doesn't support limiting searches to this shared library
// so we need to verify that the match came from this shared library
// if it was requested in the Host::DynamicLibraryOpen() function.
- if (dylib_info->options & eDynamicLibraryOpenOptionLimitGetSymbol)
+ if (dylib_info->open_options & eDynamicLibraryOpenOptionLimitGetSymbol)
{
FileSpec match_dylib_spec (Host::GetModuleFileSpecForHostAddress (symbol_addr));
if (match_dylib_spec != dylib_info->file_spec)