mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-02 07:32:52 +00:00
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
This commit is contained in:
parent
c7406ae773
commit
12591d70f6
@ -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 +
|
||||
|
Loading…
Reference in New Issue
Block a user