mirror of
https://github.com/RPCSX/llvm.git
synced 2025-03-04 19:07:26 +00:00
add \"aw\",@progbits" to ctors and dtors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32373 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
975f05852d
commit
1366626e08
@ -317,10 +317,17 @@ bool ARMAsmPrinter::doFinalization(Module &M) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (C->isNullValue())
|
||||
SwitchToDataSection(".bss", I);
|
||||
else
|
||||
SwitchToDataSection(".data", I);
|
||||
if (I->hasSection() &&
|
||||
(I->getSection() == ".ctors" ||
|
||||
I->getSection() == ".dtors")) {
|
||||
std::string SectionName = ".section " + I->getSection();
|
||||
|
||||
SectionName += ",\"aw\",@progbits";
|
||||
|
||||
SwitchToDataSection(SectionName.c_str());
|
||||
} else {
|
||||
SwitchToDataSection(TAI->getDataSection(), I);
|
||||
}
|
||||
|
||||
EmitAlignment(Align, I);
|
||||
O << "\t.type " << name << ", %object\n";
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm &&
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep "__DTOR_END__:"
|
||||
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | grep ".section .dtors,\"aw\",@progbits"
|
||||
|
||||
%__DTOR_END__ = internal global [1 x int] zeroinitializer, section ".dtors"
|
||||
|
Loading…
x
Reference in New Issue
Block a user