aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2009-07-13 18:48:39 +0000
committerBill Wendling <isanbard@gmail.com>2009-07-13 18:48:39 +0000
commitb6be139c506f2e59a024ef7774ce5db060b83556 (patch)
treeae9e888ee6d831465ccfab4726e0251b52488d03 /lib
parentc464e511273e63a570ece5760043414407636cff (diff)
downloadexternal_llvm-b6be139c506f2e59a024ef7774ce5db060b83556.zip
external_llvm-b6be139c506f2e59a024ef7774ce5db060b83556.tar.gz
external_llvm-b6be139c506f2e59a024ef7774ce5db060b83556.tar.bz2
On greater than Leopard systems, place exception tables in the __TEXT section.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75484 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/X86/X86TargetAsmInfo.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/Target/X86/X86TargetAsmInfo.cpp b/lib/Target/X86/X86TargetAsmInfo.cpp
index 4b24ccc..244d2f1 100644
--- a/lib/Target/X86/X86TargetAsmInfo.cpp
+++ b/lib/Target/X86/X86TargetAsmInfo.cpp
@@ -40,7 +40,7 @@ const char *const llvm::x86_asm_table[] = {
X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
X86TargetAsmInfo<DarwinTargetAsmInfo>(TM) {
- const X86Subtarget* Subtarget = &TM.getSubtarget<X86Subtarget>();
+ const X86Subtarget *Subtarget = &TM.getSubtarget<X86Subtarget>();
bool is64Bit = Subtarget->is64Bit();
AlignmentIsInBytes = false;
@@ -60,10 +60,12 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
SixteenByteConstantSection = getUnnamedSection("\t.literal16\n",
SectionFlags::Mergeable);
LCOMMDirective = "\t.lcomm\t";
+
// Leopard and above support aligned common symbols.
COMMDirectiveTakesAlignment = (Subtarget->getDarwinVers() >= 9);
HasDotTypeDotSizeDirective = false;
NonLocalEHFrameLabel = true;
+
if (is64Bit) {
PersonalityPrefix = "";
PersonalitySuffix = "+4@GOTPCREL";
@@ -71,6 +73,7 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
PersonalityPrefix = "L";
PersonalitySuffix = "$non_lazy_ptr";
}
+
InlineAsmStart = "## InlineAsm Start";
InlineAsmEnd = "## InlineAsm End";
CommentString = "##";
@@ -80,7 +83,6 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
ProtectedDirective = "\t.globl\t";
SupportsDebugInformation = true;
-
DwarfDebugInlineSection = ".section __DWARF,__debug_inlined,regular,debug";
DwarfUsesInlineInfoSection = true;
@@ -91,7 +93,13 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
AbsoluteEHSectionOffsets = false;
DwarfEHFrameSection =
".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