 -  #undef EXPLICIT_SYMBOL2
 -
 -  return 0;
++#undef EXPLICIT_SYMBOL
++#undef EXPLICIT_SYMBOL2
  }
 -
 -

     // Ignore VC++ runtimes prior to 7.1.  Somehow some of them get loaded
     // into the process.
     if (stricmp(ModuleName, "msvci70") != 0 &&
@@ -63,101 +58,62 @@ extern "C" {
 #endif
         stricmp(ModuleName, "msvcrt20") != 0 &&
         stricmp(ModuleName, "msvcrt40") != 0) {

 
-// Stack probing routines are in the support library (e.g. libgcc), but we don't
-// have dynamic linking on windows. Provide a hook.
 #define EXPLICIT_SYMBOL(SYM)                    \
-  extern "C" { extern void *SYM; }
+  extern "C" void *SYM;
 #define EXPLICIT_SYMBOL2(SYMFROM, SYMTO) EXPLICIT_SYMBOL(SYMTO)
 
 #include "explicit_symbols.inc"
@@ -113,51 +115,14 @@ extern "C" {
 #undef EXPLICIT_SYMBOL
 #undef EXPLICIT_SYMBOL2
 
-void* DynamicLibrary::SearchForAddressOfSymbol(const char* symbolName) {
-  SmartScopedLock<true> Lock(getMutex());
+void PopulateSpecialSymbolsImpl(StringMap<void *>& symMap) {
 
-  // First check symbols added via AddSymbol().
-  if (ExplicitSymbols) {
-    StringMap<void *>::iterator i = ExplicitSymbols->find(symbolName);
+#define EXPLICIT_SYMBOL(SYM)                    \
+  symMap[#SYM] = &SYM;
+#define EXPLICIT_SYMBOL2(SYMFROM, SYMTO) EXPLICIT_SYMBOL(SYMTO)
 
-    if (i != ExplicitSymbols->end())
-      return i->second;
-  }
+#include "explicit_symbols.inc"
 
-  // Now search the libraries.
-  if (OpenedHandles) {
-    for (DenseSet<HMODULE>::iterator I = OpenedHandles->begin(),
