Weak and linkonce global vars should still have a .globl emitted for them
authorChris Lattner <sabre@nondot.org>
Fri, 16 Dec 2005 21:46:14 +0000 (21:46 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 16 Dec 2005 21:46:14 +0000 (21:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24747 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PowerPC/PPCAsmPrinter.cpp

index b82e90344fa67e01ec90786b9efeaa6f3a50ea66..83e3b0519a93879341fffbfc6b2959a73ad27bd2 100644 (file)
@@ -468,7 +468,8 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
       switch (I->getLinkage()) {
       case GlobalValue::LinkOnceLinkage:
       case GlobalValue::WeakLinkage:
-        O << ".weak_definition " << name << '\n'
+        O << ".globl " << name << '\n'
+          << ".weak_definition " << name << '\n'
           << ".private_extern " << name << '\n';
         SwitchSection(".section __DATA,__datacoal_nt,coalesced", I);
         break;