mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
Put initialized const weak objects into correct
sections on ppc32 darwin. g++.dg/abi/key2.C git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51527 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fe5b159ae2
commit
247580b569
@ -977,7 +977,15 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
|
|||||||
case GlobalValue::CommonLinkage:
|
case GlobalValue::CommonLinkage:
|
||||||
O << "\t.globl " << name << '\n'
|
O << "\t.globl " << name << '\n'
|
||||||
<< "\t.weak_definition " << name << '\n';
|
<< "\t.weak_definition " << name << '\n';
|
||||||
SwitchToDataSection("\t.section __DATA,__datacoal_nt,coalesced", I);
|
if (!I->isConstant())
|
||||||
|
SwitchToDataSection("\t.section __DATA,__datacoal_nt,coalesced", I);
|
||||||
|
else {
|
||||||
|
const ArrayType *AT = dyn_cast<ArrayType>(Type);
|
||||||
|
if (AT && AT->getElementType()==Type::Int8Ty)
|
||||||
|
SwitchToDataSection("\t.section __TEXT,__const_coal,coalesced", I);
|
||||||
|
else
|
||||||
|
SwitchToDataSection("\t.section __DATA,__const_coal,coalesced", I);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case GlobalValue::AppendingLinkage:
|
case GlobalValue::AppendingLinkage:
|
||||||
// FIXME: appending linkage variables should go into a section of
|
// FIXME: appending linkage variables should go into a section of
|
||||||
|
Loading…
Reference in New Issue
Block a user