aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-12-16 21:46:14 +0000
committerChris Lattner <sabre@nondot.org>2005-12-16 21:46:14 +0000
commitd9e0ba49a4cf288eee9b58857b92a89f5a141c4b (patch)
tree79c53ddb357ade8d7ede72852efadef9373a1691
parentf492f9901aa9e6c5d1005f0c244be233d296d046 (diff)
Weak and linkonce global vars should still have a .globl emitted for them
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24747 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PowerPC/PPCAsmPrinter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/PowerPC/PPCAsmPrinter.cpp b/lib/Target/PowerPC/PPCAsmPrinter.cpp
index b82e90344f..83e3b0519a 100644
--- a/lib/Target/PowerPC/PPCAsmPrinter.cpp
+++ b/lib/Target/PowerPC/PPCAsmPrinter.cpp
@@ -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;