diff --git a/lib/Linker/LinkModules.cpp b/lib/Linker/LinkModules.cpp index c5d1240a2ff..d58acbec81c 100644 --- a/lib/Linker/LinkModules.cpp +++ b/lib/Linker/LinkModules.cpp @@ -531,6 +531,8 @@ static bool LinkGlobals(Module *Dest, Module *Src, else DGV->setConstant(true); } + SGV->setLinkage(GlobalValue::ExternalLinkage); + SGV->setInitializer(0); } ValueMap.insert(std::make_pair(SGV,