mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-06 12:16:59 +00:00
Fix crash before main on ppc/linux with static constructors. PR1771
llvm-svn: 43676
This commit is contained in:
parent
e493fdc317
commit
36047b0b5b
@ -668,6 +668,8 @@ bool LinuxAsmPrinter::doFinalization(Module &M) {
|
||||
if (I->hasExternalLinkage()) {
|
||||
O << "\t.global " << name << '\n';
|
||||
O << "\t.type " << name << ", @object\n";
|
||||
if (TAI->getBSSSection())
|
||||
SwitchToDataSection(TAI->getBSSSection(), I);
|
||||
O << name << ":\n";
|
||||
O << "\t.zero " << Size << "\n";
|
||||
} else if (I->hasInternalLinkage()) {
|
||||
|
@ -60,6 +60,7 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const PPCTargetMachine &TM)
|
||||
HiddenDirective = "\t.private_extern\t";
|
||||
SupportsExceptionHandling = false;
|
||||
NeedsIndirectEncoding = true;
|
||||
BSSSection = 0;
|
||||
|
||||
DwarfAbbrevSection = ".section __DWARF,__debug_abbrev,regular,debug";
|
||||
DwarfInfoSection = ".section __DWARF,__debug_info,regular,debug";
|
||||
@ -94,6 +95,7 @@ LinuxTargetAsmInfo::LinuxTargetAsmInfo(const PPCTargetMachine &TM)
|
||||
StaticDtorsSection = ".section\t.dtors,\"aw\",@progbits";
|
||||
UsedDirective = "\t# .no_dead_strip\t";
|
||||
WeakRefDirective = "\t.weak\t";
|
||||
BSSSection = "\t.section\t\".sbss\",\"aw\",@nobits";
|
||||
|
||||
DwarfAbbrevSection = "\t.section\t.debug_abbrev,\"\",@progbits";
|
||||
DwarfInfoSection = "\t.section\t.debug_info,\"\",@progbits";
|
||||
|
Loading…
x
Reference in New Issue
Block a user