[PATCH] D96211: [llvm-objdump] Support PLT decoding for aarch64_be
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 8 08:50:48 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
MaskRay marked an inline comment as done.
Closed by commit rG157ac423e004: [llvm-objdump] Support PLT decoding for aarch64_be (authored by MaskRay).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D96211/new/
https://reviews.llvm.org/D96211
Files:
llvm/lib/Object/ELFObjectFile.cpp
llvm/test/tools/llvm-objdump/ELF/AArch64/plt.test
Index: llvm/test/tools/llvm-objdump/ELF/AArch64/plt.test
===================================================================
--- llvm/test/tools/llvm-objdump/ELF/AArch64/plt.test
+++ llvm/test/tools/llvm-objdump/ELF/AArch64/plt.test
@@ -6,8 +6,9 @@
# CHECK: bl {{.*}} <__cfi_slowpath at plt>
# RUN: yaml2obj %s -o %t.aarch64
-# RUN: llvm-objdump -d --mattr=+bti %t.aarch64 | \
-# RUN: FileCheck --check-prefix=CHECK-BTI %s
+# RUN: llvm-objdump -d --mattr=+bti %t.aarch64 | FileCheck --check-prefix=CHECK-BTI %s
+# RUN: yaml2obj -DENDIAN=MSB %s -o %t.aarch64_be
+# RUN: llvm-objdump -d --mattr=+bti %t.aarch64_be | FileCheck --check-prefix=CHECK-BTI %s
# CHECK-BTI: bl {{.*}} <f1 at plt>
# CHECK-BTI: bl {{.*}} <f2 at plt>
# CHECK-BTI: Disassembly of section .plt:
@@ -34,7 +35,7 @@
--- !ELF
FileHeader:
Class: ELFCLASS64
- Data: ELFDATA2LSB
+ Data: ELFDATA2[[ENDIAN=LSB]]
Type: ET_EXEC
Machine: EM_AARCH64
Sections:
@@ -62,6 +63,7 @@
Content: 5F2403D5F07BBFA910010090110A40F91042009120021FD61F2003D51F2003D55F2403D510010090110E40F9106200919F2103D520021FD65F2403D510010090111240F9108200919F2103D520021FD6
- Name: .got.plt
Type: SHT_PROGBITS
+## The content is in little-endian, but it does not affect aarch64_be PLT decoding.
Content: '000000000000000000000000000000000000000000000000100021000000000010002100000000001000210000000000'
Symbols:
- Name: f1
Index: llvm/lib/Object/ELFObjectFile.cpp
===================================================================
--- llvm/lib/Object/ELFObjectFile.cpp
+++ llvm/lib/Object/ELFObjectFile.cpp
@@ -581,6 +581,7 @@
JumpSlotReloc = ELF::R_X86_64_JUMP_SLOT;
break;
case Triple::aarch64:
+ case Triple::aarch64_be:
JumpSlotReloc = ELF::R_AARCH64_JUMP_SLOT;
break;
default:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96211.322126.patch
Type: text/x-patch
Size: 1810 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210208/e55966ba/attachment.bin>
More information about the llvm-commits
mailing list