Skip to content

[llvm-readelf] Print ARM specific OSABI values in GNU mode #82186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/test/tools/llvm-readobj/ELF/file-header-os-abi.test
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ FileHeader:
# RUN: llvm-readelf --file-headers %t.osabi.arm | FileCheck %s --match-full-lines --check-prefix=OSABI-ARM-GNU

# OSABI-ARM-LLVM: OS/ABI: ARM (0x61)
# OSABI-ARM-GNU: OS/ABI: 61
# OSABI-ARM-GNU: OS/ABI: ARM

## Check all EM_TI_C6000 specific values.

Expand Down
3 changes: 3 additions & 0 deletions llvm/tools/llvm-readobj/ELFDumper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3553,6 +3553,9 @@ template <class ELFT> void GNUELFDumper<ELFT>::printFileHeaders() {
if (e.e_ident[ELF::EI_OSABI] >= ELF::ELFOSABI_FIRST_ARCH &&
e.e_ident[ELF::EI_OSABI] <= ELF::ELFOSABI_LAST_ARCH) {
switch (e.e_machine) {
case ELF::EM_ARM:
OSABI = ArrayRef(ARMElfOSABI);
break;
case ELF::EM_AMDGPU:
OSABI = ArrayRef(AMDGPUElfOSABI);
break;
Expand Down