Skip to content

Commit cd20a7f

Browse files
authored
[llvm-readelf] Print ARM specific OSABI values in GNU mode (#82186)
Similar to #75661. Currently, there is only ELFOSABI_ARM, but I plan to add ELFOSABI_ARM_FDPIC in a subsequent patch #82187
1 parent c98da37 commit cd20a7f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

llvm/test/tools/llvm-readobj/ELF/file-header-os-abi.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ FileHeader:
190190
# RUN: llvm-readelf --file-headers %t.osabi.arm | FileCheck %s --match-full-lines --check-prefix=OSABI-ARM-GNU
191191

192192
# OSABI-ARM-LLVM: OS/ABI: ARM (0x61)
193-
# OSABI-ARM-GNU: OS/ABI: 61
193+
# OSABI-ARM-GNU: OS/ABI: ARM
194194

195195
## Check all EM_TI_C6000 specific values.
196196

llvm/tools/llvm-readobj/ELFDumper.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3553,6 +3553,9 @@ template <class ELFT> void GNUELFDumper<ELFT>::printFileHeaders() {
35533553
if (e.e_ident[ELF::EI_OSABI] >= ELF::ELFOSABI_FIRST_ARCH &&
35543554
e.e_ident[ELF::EI_OSABI] <= ELF::ELFOSABI_LAST_ARCH) {
35553555
switch (e.e_machine) {
3556+
case ELF::EM_ARM:
3557+
OSABI = ArrayRef(ARMElfOSABI);
3558+
break;
35563559
case ELF::EM_AMDGPU:
35573560
OSABI = ArrayRef(AMDGPUElfOSABI);
35583561
break;

0 commit comments

Comments
 (0)