           E = OpenedHandles->end(); I != E; ++I) {
        //lt_ptr ptr = lt_dlsym(*I, symbolName);
 -      void *ptr = dlsym(*I, symbolName);
-+      void *ptr = GetAddressOfSymbolImpl(I->first, symbolName);
++      void *ptr = GetAddressOfSymbolImpl(I->first, symbolName, true /*Global*/);
        if (ptr) {
          return ptr;
        }

+// Close the shared library.
+static void  CloseLibraryImpl(void *dlHandle);
+// Get the address of the symbol named symname from the library with dlhandle.
+static void *GetAddressOfSymbolImpl(void *dlHandle, const char *symbolName);
+// Inject special platform symbols into the map of explicitly defined symbols.
+static void PopulateSpecialSymbolsImpl(StringMap<void *>& symMap);
+

-  if (errMsg) *errMsg = "dlopen() not supported on this platform";
-  return DynamicLibrary();
+void* DynamicLibrary::getAddressOfSymbol(const char *symbolName) {
+  return GetAddressOfSymbolImpl(Data, symbolName, false /*Global*/);
 }
 
-void *DynamicLibrary::getAddressOfSymbol(const char *symbolName) {
