mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-01 08:28:19 +00:00
On greater than Leopard systems, place exception tables in the __TEXT section.
llvm-svn: 75484
This commit is contained in:
parent
d86bb86bd3
commit
4ef26e9b22
@ -40,7 +40,7 @@ const char *const llvm::x86_asm_table[] = {
|
|||||||
|
|
||||||
X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
|
X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
|
||||||
X86TargetAsmInfo<DarwinTargetAsmInfo>(TM) {
|
X86TargetAsmInfo<DarwinTargetAsmInfo>(TM) {
|
||||||
const X86Subtarget* Subtarget = &TM.getSubtarget<X86Subtarget>();
|
const X86Subtarget *Subtarget = &TM.getSubtarget<X86Subtarget>();
|
||||||
bool is64Bit = Subtarget->is64Bit();
|
bool is64Bit = Subtarget->is64Bit();
|
||||||
|
|
||||||
AlignmentIsInBytes = false;
|
AlignmentIsInBytes = false;
|
||||||
@ -60,10 +60,12 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
|
|||||||
SixteenByteConstantSection = getUnnamedSection("\t.literal16\n",
|
SixteenByteConstantSection = getUnnamedSection("\t.literal16\n",
|
||||||
SectionFlags::Mergeable);
|
SectionFlags::Mergeable);
|
||||||
LCOMMDirective = "\t.lcomm\t";
|
LCOMMDirective = "\t.lcomm\t";
|
||||||
|
|
||||||
// Leopard and above support aligned common symbols.
|
// Leopard and above support aligned common symbols.
|
||||||
COMMDirectiveTakesAlignment = (Subtarget->getDarwinVers() >= 9);
|
COMMDirectiveTakesAlignment = (Subtarget->getDarwinVers() >= 9);
|
||||||
HasDotTypeDotSizeDirective = false;
|
HasDotTypeDotSizeDirective = false;
|
||||||
NonLocalEHFrameLabel = true;
|
NonLocalEHFrameLabel = true;
|
||||||
|
|
||||||
if (is64Bit) {
|
if (is64Bit) {
|
||||||
PersonalityPrefix = "";
|
PersonalityPrefix = "";
|
||||||
PersonalitySuffix = "+4@GOTPCREL";
|
PersonalitySuffix = "+4@GOTPCREL";
|
||||||
@ -71,6 +73,7 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
|
|||||||
PersonalityPrefix = "L";
|
PersonalityPrefix = "L";
|
||||||
PersonalitySuffix = "$non_lazy_ptr";
|
PersonalitySuffix = "$non_lazy_ptr";
|
||||||
}
|
}
|
||||||
|
|
||||||
InlineAsmStart = "## InlineAsm Start";
|
InlineAsmStart = "## InlineAsm Start";
|
||||||
InlineAsmEnd = "## InlineAsm End";
|
InlineAsmEnd = "## InlineAsm End";
|
||||||
CommentString = "##";
|
CommentString = "##";
|
||||||
@ -80,7 +83,6 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
|
|||||||
ProtectedDirective = "\t.globl\t";
|
ProtectedDirective = "\t.globl\t";
|
||||||
|
|
||||||
SupportsDebugInformation = true;
|
SupportsDebugInformation = true;
|
||||||
|
|
||||||
DwarfDebugInlineSection = ".section __DWARF,__debug_inlined,regular,debug";
|
DwarfDebugInlineSection = ".section __DWARF,__debug_inlined,regular,debug";
|
||||||
DwarfUsesInlineInfoSection = true;
|
DwarfUsesInlineInfoSection = true;
|
||||||
|
|
||||||
@ -91,7 +93,13 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
|
|||||||
AbsoluteEHSectionOffsets = false;
|
AbsoluteEHSectionOffsets = false;
|
||||||
DwarfEHFrameSection =
|
DwarfEHFrameSection =
|
||||||
".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support";
|
".section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support";
|
||||||
DwarfExceptionSection = ".section __DATA,__gcc_except_tab";
|
|
||||||
|
// Leopard and earlier put exception tables in __DATA. Greater than Leopard
|
||||||
|
// put them in __TEXT.
|
||||||
|
if (Subtarget->getDarwinVers() < 10)
|
||||||
|
DwarfExceptionSection = ".section __DATA,__gcc_except_tab";
|
||||||
|
else
|
||||||
|
DwarfExceptionSection = ".section __TEXT,__gcc_except_tab";
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned
|
unsigned
|
||||||
|
Loading…
Reference in New Issue
Block a user