1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

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.

llvm-svn: 252300
This commit is contained in:
Rafael Espindola 2015-11-06 13:35:35 +00:00
parent 53d16282cf
commit ffefd5874b
20 changed files with 24 additions and 26 deletions

View File

@ -416,16 +416,14 @@ void MCObjectFileInfo::initELFMCObjectFileInfo(Triple T) {
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,

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]

View File

@ -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: ]