[llvm] r252300 - Use SHT_X86_64_UNWIND on every OS.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 6 05:35:35 PST 2015


Author: rafael
Date: Fri Nov  6 07:35:35 2015
New Revision: 252300

URL: http://llvm.org/viewvc/llvm-project?rev=252300&view=rev
Log:
Use SHT_X86_64_UNWIND on every OS.

That is the ABI required type. Linkers still check the section name, so
everything should still work.

Modified:
    llvm/trunk/lib/MC/MCObjectFileInfo.cpp
    llvm/trunk/test/MC/ELF/cfi-adjust-cfa-offset.s
    llvm/trunk/test/MC/ELF/cfi-advance-loc2.s
    llvm/trunk/test/MC/ELF/cfi-def-cfa-offset.s
    llvm/trunk/test/MC/ELF/cfi-def-cfa-register.s
    llvm/trunk/test/MC/ELF/cfi-def-cfa.s
    llvm/trunk/test/MC/ELF/cfi-escape.s
    llvm/trunk/test/MC/ELF/cfi-large-model.s
    llvm/trunk/test/MC/ELF/cfi-offset.s
    llvm/trunk/test/MC/ELF/cfi-register.s
    llvm/trunk/test/MC/ELF/cfi-rel-offset.s
    llvm/trunk/test/MC/ELF/cfi-rel-offset2.s
    llvm/trunk/test/MC/ELF/cfi-remember.s
    llvm/trunk/test/MC/ELF/cfi-restore.s
    llvm/trunk/test/MC/ELF/cfi-same-value.s
    llvm/trunk/test/MC/ELF/cfi-signal-frame.s
    llvm/trunk/test/MC/ELF/cfi-undefined.s
    llvm/trunk/test/MC/ELF/cfi-window-save.s
    llvm/trunk/test/MC/ELF/cfi-zero-addr-delta.s
    llvm/trunk/test/MC/ELF/cfi.s

Modified: llvm/trunk/lib/MC/MCObjectFileInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCObjectFileInfo.cpp?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/lib/MC/MCObjectFileInfo.cpp (original)
+++ llvm/trunk/lib/MC/MCObjectFileInfo.cpp Fri Nov  6 07:35:35 2015
@@ -416,16 +416,14 @@ void MCObjectFileInfo::initELFMCObjectFi
     break;
   }
 
+  EHSectionType = T.getArch() == Triple::x86_64 ? ELF::SHT_X86_64_UNWIND
+                                                : ELF::SHT_PROGBITS;
+
   // Solaris requires different flags for .eh_frame to seemingly every other
   // platform.
-  EHSectionType = ELF::SHT_PROGBITS;
   EHSectionFlags = ELF::SHF_ALLOC;
-  if (T.isOSSolaris()) {
-    if (T.getArch() == Triple::x86_64)
-      EHSectionType = ELF::SHT_X86_64_UNWIND;
-    else
-      EHSectionFlags |= ELF::SHF_WRITE;
-  }
+  if (T.isOSSolaris() && T.getArch() != Triple::x86_64)
+    EHSectionFlags |= ELF::SHF_WRITE;
 
   // ELF
   BSSSection = Ctx->getELFSection(".bss", ELF::SHT_NOBITS,

Modified: llvm/trunk/test/MC/ELF/cfi-adjust-cfa-offset.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-adjust-cfa-offset.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-adjust-cfa-offset.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-adjust-cfa-offset.s Fri Nov  6 07:35:35 2015
@@ -24,7 +24,7 @@ f:
 // CHECK:        Section {
 // CHECK:          Index:
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-advance-loc2.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-advance-loc2.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-advance-loc2.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-advance-loc2.s Fri Nov  6 07:35:35 2015
@@ -12,7 +12,7 @@ f:
 
 // CHECK:        Section {
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-def-cfa-offset.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-def-cfa-offset.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-def-cfa-offset.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-def-cfa-offset.s Fri Nov  6 07:35:35 2015
@@ -13,7 +13,7 @@ f:
 // CHECK:        Section {
 // CHECK:          Index:
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-def-cfa-register.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-def-cfa-register.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-def-cfa-register.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-def-cfa-register.s Fri Nov  6 07:35:35 2015
@@ -9,7 +9,7 @@ f:
 
 // CHECK:        Section {
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-def-cfa.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-def-cfa.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-def-cfa.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-def-cfa.s Fri Nov  6 07:35:35 2015
@@ -9,7 +9,7 @@ f:
 
 // CHECK:        Section {
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-escape.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-escape.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-escape.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-escape.s Fri Nov  6 07:35:35 2015
@@ -10,7 +10,7 @@ f:
 // CHECK:        Section {
 // CHECK:          Index:
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-large-model.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-large-model.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-large-model.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-large-model.s Fri Nov  6 07:35:35 2015
@@ -4,7 +4,7 @@
 // CHECK:      Section {
 // CHECK:        Index: 
 // CHECK:        Name: .eh_frame
-// CHECK-NEXT:   Type: SHT_PROGBITS
+// CHECK-NEXT:   Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:   Flags [
 // CHECK-NEXT:     SHF_ALLOC
 // CHECK-NEXT:   ]

Modified: llvm/trunk/test/MC/ELF/cfi-offset.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-offset.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-offset.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-offset.s Fri Nov  6 07:35:35 2015
@@ -9,7 +9,7 @@ f:
 
 // CHECK:        Section {
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-register.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-register.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-register.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-register.s Fri Nov  6 07:35:35 2015
@@ -10,7 +10,7 @@ f:
 // CHECK:        Section {
 // CHECK:          Index:
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-rel-offset.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-rel-offset.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-rel-offset.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-rel-offset.s Fri Nov  6 07:35:35 2015
@@ -17,7 +17,7 @@ f:
 // CHECK:        Section {
 // CHECK:          Index:
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-rel-offset2.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-rel-offset2.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-rel-offset2.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-rel-offset2.s Fri Nov  6 07:35:35 2015
@@ -9,7 +9,7 @@ f:
 // CHECK:        Section {
 // CHECK:          Index:
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-remember.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-remember.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-remember.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-remember.s Fri Nov  6 07:35:35 2015
@@ -12,7 +12,7 @@ f:
 // CHECK:        Section {
 // CHECK:          Index:
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-restore.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-restore.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-restore.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-restore.s Fri Nov  6 07:35:35 2015
@@ -10,7 +10,7 @@ f:
 // CHECK:        Section {
 // CHECK:          Index:
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-same-value.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-same-value.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-same-value.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-same-value.s Fri Nov  6 07:35:35 2015
@@ -10,7 +10,7 @@ f:
 // CHECK:        Section {
 // CHECK:          Index:
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-signal-frame.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-signal-frame.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-signal-frame.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-signal-frame.s Fri Nov  6 07:35:35 2015
@@ -11,7 +11,7 @@ g:
 
 // CHECK:        Section {
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-undefined.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-undefined.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-undefined.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-undefined.s Fri Nov  6 07:35:35 2015
@@ -10,7 +10,7 @@ f:
 // CHECK:        Section {
 // CHECK:          Index:
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-window-save.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-window-save.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-window-save.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-window-save.s Fri Nov  6 07:35:35 2015
@@ -12,7 +12,7 @@ f:
 
 // CHECK:        Section {
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi-zero-addr-delta.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi-zero-addr-delta.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi-zero-addr-delta.s (original)
+++ llvm/trunk/test/MC/ELF/cfi-zero-addr-delta.s Fri Nov  6 07:35:35 2015
@@ -16,7 +16,7 @@ f:
 
 // CHECK:        Section {
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]

Modified: llvm/trunk/test/MC/ELF/cfi.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ELF/cfi.s?rev=252300&r1=252299&r2=252300&view=diff
==============================================================================
--- llvm/trunk/test/MC/ELF/cfi.s (original)
+++ llvm/trunk/test/MC/ELF/cfi.s Fri Nov  6 07:35:35 2015
@@ -220,7 +220,7 @@ f37:
 // CHECK:        Section {
 // CHECK:          Index:
 // CHECK:          Name: .eh_frame
-// CHECK-NEXT:     Type: SHT_PROGBITS
+// CHECK-NEXT:     Type: SHT_X86_64_UNWIND
 // CHECK-NEXT:     Flags [
 // CHECK-NEXT:       SHF_ALLOC
 // CHECK-NEXT:     ]




More information about the llvm-commits mailing list