[PATCH] D83644: [AArch64][ELF] Support FDE references more than +/-2GB range for AArch64 large code model
weiwei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 12 09:37:00 PDT 2020
wwei created this revision.
wwei added reviewers: psmith, MaskRay, keith.walker.arm, jmolloy, leonardchan, mcgrathr, pcc.
wwei added a project: LLVM.
Herald added subscribers: llvm-commits, danielkiss, hiraditya, kristof.beyls, emaste.
Herald added a reviewer: espindola.
For JIT applications, the code and .eh_frame maybe placed very far apart.
The large code model for AArch64 should handle FDE references more than +/-2GB range.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83644
Files:
llvm/lib/MC/MCObjectFileInfo.cpp
llvm/test/MC/ELF/cfi-large-model.s
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,12 @@
+// 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-linux-gnu -large-code-model %s \
+// RUN: -o - | llvm-readobj -S --sd | FileCheck --check-prefix=CHECK-ARM64 %s
// CHECK-X86: Section {
// CHECK-X86: Index:
@@ -48,6 +50,27 @@
// 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: }
+
f:
.cfi_startproc
.cfi_endproc
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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83644.277293.patch
Type: text/x-patch
Size: 2254 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200712/55a08516/attachment.bin>
More information about the llvm-commits
mailing list