aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM/ARMAsmPrinter.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-01-11 01:59:45 +0000
committerDale Johannesen <dalej@apple.com>2008-01-11 01:59:45 +0000
commiteafd8b5511c33bdd80c66ebdaced4d6d59837ffd (patch)
tree5d36419c7e0011e4e2c5d4010bec96232a84604d /lib/Target/ARM/ARMAsmPrinter.cpp
parent3c78832aaa55edeeae23d00955a969bbe024c9a6 (diff)
downloadexternal_llvm-eafd8b5511c33bdd80c66ebdaced4d6d59837ffd.zip
external_llvm-eafd8b5511c33bdd80c66ebdaced4d6d59837ffd.tar.gz
external_llvm-eafd8b5511c33bdd80c66ebdaced4d6d59837ffd.tar.bz2
Weak zeroes don't go in bss on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/ARMAsmPrinter.cpp')
-rw-r--r--lib/Target/ARM/ARMAsmPrinter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Target/ARM/ARMAsmPrinter.cpp b/lib/Target/ARM/ARMAsmPrinter.cpp
index 50c856e..4cea342 100644
--- a/lib/Target/ARM/ARMAsmPrinter.cpp
+++ b/lib/Target/ARM/ARMAsmPrinter.cpp
@@ -845,8 +845,9 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
}
}
- if (I->hasInternalLinkage() || I->hasWeakLinkage() ||
- I->hasLinkOnceLinkage()) {
+ if (I->hasInternalLinkage() ||
+ (!Subtarget->isTargetDarwin() &&
+ (I->hasWeakLinkage() || I->hasLinkOnceLinkage()))) {
if (Size == 0) Size = 1; // .comm Foo, 0 is undefined, avoid it.
if (!NoZerosInBSS && TAI->getBSSSection())
SwitchToDataSection(TAI->getBSSSection(), I);
@@ -877,7 +878,7 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
if (Subtarget->isTargetDarwin()) {
O << "\t.globl " << name << "\n"
<< "\t.weak_definition " << name << "\n";
- SwitchToDataSection("\t.section __DATA,__const_coal,coalesced", I);
+ SwitchToDataSection("\t.section __DATA,__datacoal_nt,coalesced", I);
} else {
std::string SectionName("\t.section\t.llvm.linkonce.d." +
name +