mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
Honor explicit section information on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46267 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
97ca75e4bb
commit
25edeb32e7
@ -908,6 +908,10 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
|
||||
std::string SectionName = ".section " + I->getSection();
|
||||
SectionName += ",\"aw\",%progbits";
|
||||
SwitchToDataSection(SectionName.c_str());
|
||||
} else if (I->hasSection() && Subtarget->isTargetDarwin()) {
|
||||
// Honor all section names on Darwin; ObjC uses this
|
||||
std::string SectionName = ".section " + I->getSection();
|
||||
SwitchToDataSection(SectionName.c_str());
|
||||
} else {
|
||||
if (C->isNullValue() && !NoZerosInBSS && TAI->getBSSSection())
|
||||
SwitchToDataSection(I->isThreadLocal() ? TAI->getTLSBSSSection() :
|
||||
|
@ -958,8 +958,11 @@ bool DarwinAsmPrinter::doFinalization(Module &M) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!I->isConstant())
|
||||
if (I->hasSection()) {
|
||||
// Honor all section names on Darwin; ObjC uses this
|
||||
std::string SectionName = ".section " + I->getSection();
|
||||
SwitchToDataSection(SectionName.c_str());
|
||||
} else if (!I->isConstant())
|
||||
SwitchToDataSection(TAI->getDataSection(), I);
|
||||
else {
|
||||
// Read-only data.
|
||||
|
@ -275,7 +275,10 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
|
||||
assert(!Subtarget->isTargetDarwin());
|
||||
SectionName += ",\"aw\",@progbits";
|
||||
}
|
||||
|
||||
SwitchToDataSection(SectionName.c_str());
|
||||
} else if (I->hasSection() && Subtarget->isTargetDarwin()) {
|
||||
// Honor all section names on Darwin; ObjC uses this
|
||||
std::string SectionName = ".section " + I->getSection();
|
||||
SwitchToDataSection(SectionName.c_str());
|
||||
} else {
|
||||
if (C->isNullValue() && !NoZerosInBSS && TAI->getBSSSection())
|
||||
|
Loading…
Reference in New Issue
Block a user