diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp
index de44391..7e8245a 100644
--- a/lib/Linker/LinkModules.cpp
+++ b/lib/Linker/LinkModules.cpp
@@ -19,16 +19,18 @@
 #include "llvm/Linker.h"
 #include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
-#include "llvm/Instructions.h"
 #include "llvm/LLVMContext.h"
 #include "llvm/Module.h"
 #include "llvm/TypeSymbolTable.h"
 #include "llvm/ValueSymbolTable.h"
+#include "llvm/Instructions.h"
+#include "llvm/Assembly/Writer.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/System/Path.h"
 #include "llvm/Transforms/Utils/ValueMapper.h"
+#include "llvm/ADT/DenseMap.h"
 using namespace llvm;
 
 // Error - Simple wrapper function to conditionally assign to E and return true.
@@ -454,24 +456,6 @@
   }
 }
 
-// RequiresUnique - Returns true if the global variable needs to be
-// unique. I.e., there shouldn't be a new global variable created in the
-// destination Module, rather the source variable's initializer needs to be
-// identical to the destination variable's initializer.
-static bool RequiresUnique(const GlobalVariable *SGV,
-                           const GlobalVariable *DGV) {
-  const StringRef SrcSec(SGV->getSection());
-  const StringRef DstSec(DGV->getSection());
-
-  // The Objective-C __image_info section should be unique.
-  if (SrcSec == DstSec &&
-      (SrcSec.find("__objc_imageinfo") != StringRef::npos ||
-       SrcSec.find("__image_info") != StringRef::npos))
-    return true;
-
-  return false;
-}
-
 // LinkGlobals - Loop through the global variables in the src module and merge
 // them into the dest module.
 static bool LinkGlobals(Module *Dest, const Module *Src,
@@ -486,24 +470,10 @@
     const GlobalVariable *SGV = I;
     GlobalValue *DGV = 0;
 
-    GlobalValue *SymTabGV =
-      cast_or_null<GlobalValue>(DestSymTab.lookup(SGV->getName()));
-
-    // Check to see if the symbol exists in the destination module and needs to
-    // be merged instead of replaced.
-    if (SymTabGV) {
-      const GlobalVariable *GV = dyn_cast<GlobalVariable>(SymTabGV);
-      if (GV && RequiresUnique(SGV, GV)) {
-        // Make sure to remember this mapping.
-        ValueMap[SGV] = SymTabGV;
-        continue;
-      }
-    }
-
-    // Check to see if we may have to link the global with a global, alias, or
+    // Check to see if may have to link the global with the global, alias or
     // function.
     if (SGV->hasName() && !SGV->hasLocalLinkage())
-      DGV = SymTabGV;
+      DGV = cast_or_null<GlobalValue>(DestSymTab.lookup(SGV->getName()));
 
     // If we found a global with the same name in the dest module, but it has
     // internal linkage, we are really not doing any linkage here.
@@ -849,10 +819,10 @@
       // Grab destination global variable or alias.
       GlobalValue *DGV = cast<GlobalValue>(ValueMap[SGV]->stripPointerCasts());
 
-      // If dest is a global variable, check that initializers match.
+      // If dest if global variable, check that initializers match.
       if (GlobalVariable *DGVar = dyn_cast<GlobalVariable>(DGV)) {
         if (DGVar->hasInitializer()) {
-          if (SGV->hasExternalLinkage() || RequiresUnique(SGV, DGVar)) {
+          if (SGV->hasExternalLinkage()) {
             if (DGVar->getInitializer() != SInit)
               return Error(Err, "Global Variable Collision on '" +
                            SGV->getName() +
