Index: llvm/lib/MC/MCObjectFileInfo.cpp =================================================================== --- llvm/lib/MC/MCObjectFileInfo.cpp +++ llvm/lib/MC/MCObjectFileInfo.cpp @@ -315,6 +315,8 @@ ? dwarf::DW_EH_PE_sdata4 : dwarf::DW_EH_PE_sdata8; break; + case Triple::aarch64: + case Triple::aarch64_be: case Triple::ppc64: case Triple::ppc64le: case Triple::x86_64: Index: llvm/test/MC/ELF/cfi-large-model.s =================================================================== --- llvm/test/MC/ELF/cfi-large-model.s +++ llvm/test/MC/ELF/cfi-large-model.s @@ -1,10 +1,14 @@ +// REQUIRES: aarch64-registered-target // REQUIRES: powerpc-registered-target // REQUIRES: x86-registered-target // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu -large-code-model %s \ // RUN: -o - | llvm-readobj -S --sd | FileCheck --check-prefix=CHECK-X86 %s // RUN: llvm-mc -filetype=obj -triple powerpc64le-linux-gnu -large-code-model %s \ // RUN: -o - | llvm-readobj -S --sd | FileCheck --check-prefix=CHECK-PPC %s - +// RUN: llvm-mc -filetype=obj -triple aarch64 -large-code-model %s \ +// RUN: -o - | llvm-readobj -S --sd | FileCheck --check-prefix=CHECK-ARM64 %s +// RUN: llvm-mc -filetype=obj -triple aarch64_be -large-code-model %s \ +// RUN: -o - | llvm-readobj -S --sd | FileCheck --check-prefix=CHECK-ARM64-BE %s // CHECK-X86: Section { // CHECK-X86: Index: @@ -48,6 +52,48 @@ // CHECK-PPC-NEXT: ) // CHECK-PPC-NEXT: } +// CHECK-ARM64: Section { +// CHECK-ARM64: Index: +// CHECK-ARM64: Name: .eh_frame +// CHECK-ARM64-NEXT: Type: SHT_PROGBITS +// CHECK-ARM64-NEXT: Flags [ +// CHECK-ARM64-NEXT: SHF_ALLOC +// CHECK-ARM64-NEXT: ] +// CHECK-ARM64-NEXT: Address: 0x0 +// CHECK-ARM64-NEXT: Offset: 0x40 +// CHECK-ARM64-NEXT: Size: 48 +// CHECK-ARM64-NEXT: Link: 0 +// CHECK-ARM64-NEXT: Info: 0 +// CHECK-ARM64-NEXT: AddressAlignment: 8 +// CHECK-ARM64-NEXT: EntrySize: 0 +// CHECK-ARM64-NEXT: SectionData ( +// CHECK-ARM64-NEXT: 0000: 10000000 00000000 017A5200 017C1E01 |.........zR..|..| +// CHECK-ARM64-NEXT: 0010: 1C0C1F00 18000000 18000000 00000000 |................| +// CHECK-ARM64-NEXT: 0020: 00000000 00000000 00000000 00000000 |................| +// CHECK-ARM64-NEXT: ) +// CHECK-ARM64-NEXT: } + +// CHECK-ARM64-BE: Section { +// CHECK-ARM64-BE: Index: +// CHECK-ARM64-BE: Name: .eh_frame +// CHECK-ARM64-BE-NEXT: Type: SHT_PROGBITS +// CHECK-ARM64-BE-NEXT: Flags [ +// CHECK-ARM64-BE-NEXT: SHF_ALLOC +// CHECK-ARM64-BE-NEXT: ] +// CHECK-ARM64-BE-NEXT: Address: 0x0 +// CHECK-ARM64-BE-NEXT: Offset: 0x40 +// CHECK-ARM64-BE-NEXT: Size: 48 +// CHECK-ARM64-BE-NEXT: Link: 0 +// CHECK-ARM64-BE-NEXT: Info: 0 +// CHECK-ARM64-BE-NEXT: AddressAlignment: 8 +// CHECK-ARM64-BE-NEXT: EntrySize: 0 +// CHECK-ARM64-BE-NEXT: SectionData ( +// CHECK-ARM64-BE-NEXT: 0000: 00000010 00000000 017A5200 017C1E01 |.........zR..|..| +// CHECK-ARM64-BE-NEXT: 0010: 1C0C1F00 00000018 00000018 00000000 |................| +// CHECK-ARM64-BE-NEXT: 0020: 00000000 00000000 00000000 00000000 |................| +// CHECK-ARM64-BE-NEXT: ) +// CHECK-ARM64-BE-NEXT: } + f: .cfi_startproc .cfi_endproc