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";
; 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"