[llvm-commits] [llvm] r75484 - /llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp

Bill Wendling isanbard at gmail.com
Mon Jul 13 11:48:58 PDT 2009


Author: void
Date: Mon Jul 13 13:48:39 2009
New Revision: 75484

URL: http://llvm.org/viewvc/llvm-project?rev=75484&view=rev
Log:
On greater than Leopard systems, place exception tables in the __TEXT section.

Modified:
    llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp

Modified: llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp?rev=75484&r1=75483&r2=75484&view=diff

==============================================================================
--- llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86TargetAsmInfo.cpp Mon Jul 13 13:48:39 2009
@@ -40,7 +40,7 @@
 
 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 @@
     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 at GOTPCREL";
@@ -71,6 +73,7 @@
     PersonalityPrefix = "L";
     PersonalitySuffix = "$non_lazy_ptr";
   }
+
   InlineAsmStart = "## InlineAsm Start";
   InlineAsmEnd = "## InlineAsm End";
   CommentString = "##";
@@ -80,7 +83,6 @@
   ProtectedDirective = "\t.globl\t";
 
   SupportsDebugInformation = true;
-
   DwarfDebugInlineSection = ".section __DWARF,__debug_inlined,regular,debug";
   DwarfUsesInlineInfoSection = true;
 
@@ -91,7 +93,13 @@
   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





More information about the llvm-commits mailing list