forked from OSchip/llvm-project
Do section switching right way for Mingw\Cygwin and Linux.
This will allow (after llvm-gcc linkage fix) more dummy tests using libstdc++ to pass on mingw :) llvm-svn: 31120
This commit is contained in:
parent
6d6fc26257
commit
41a83d7871
|
@ -180,12 +180,18 @@ bool X86SharedAsmPrinter::doFinalization(Module &M) {
|
||||||
<< "\t.weak_definition " << name << "\n";
|
<< "\t.weak_definition " << name << "\n";
|
||||||
SwitchToDataSection(".section __DATA,__const_coal,coalesced", I);
|
SwitchToDataSection(".section __DATA,__const_coal,coalesced", I);
|
||||||
} else if (Subtarget->isTargetCygwin()) {
|
} else if (Subtarget->isTargetCygwin()) {
|
||||||
O << "\t.section\t.data$linkonce." << name << ",\"aw\"\n"
|
std::string SectionName(".section\t.data$linkonce." +
|
||||||
<< "\t.globl " << name << "\n"
|
name +
|
||||||
|
",\"aw\"\n");
|
||||||
|
SwitchToDataSection(SectionName.c_str(), I);
|
||||||
|
O << "\t.globl " << name << "\n"
|
||||||
<< "\t.linkonce same_size\n";
|
<< "\t.linkonce same_size\n";
|
||||||
} else {
|
} else {
|
||||||
O << "\t.section\t.llvm.linkonce.d." << name << ",\"aw\",@progbits\n"
|
std::string SectionName("\t.section\t.llvm.linkonce.d." +
|
||||||
<< "\t.weak " << name << "\n";
|
name +
|
||||||
|
",\"aw\",@progbits\n");
|
||||||
|
SwitchToDataSection(SectionName.c_str(), I);
|
||||||
|
O << "\t.weak " << name << "\n";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GlobalValue::AppendingLinkage:
|
case GlobalValue::AppendingLinkage:
|
||||||
|
|
Loading…
Reference in New Issue