Skip to content

[llvm-objdump] Add support for the PT_OPENBSD_SYSCALLS segment type. #82121

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 20, 2024
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
3 changes: 3 additions & 0 deletions llvm/test/tools/llvm-objdump/openbsd-headers.test
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# CHECK-NEXT: filesz 0x0000000000000000 memsz 0x0000000000000000 flags ---
# CHECK-NEXT: OPENBSD_NOBTCFI off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**0
# CHECK-NEXT: filesz 0x0000000000000000 memsz 0x0000000000000000 flags ---
# CHECK-NEXT: OPENBSD_SYSCALLS off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**0
# CHECK-NEXT: filesz 0x0000000000000000 memsz 0x0000000000000000 flags ---
# CHECK-NEXT: OPENBSD_BOOTDATA off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2**0
# CHECK-NEXT: filesz 0x0000000000000000 memsz 0x0000000000000000 flags ---

Expand All @@ -25,4 +27,5 @@ ProgramHeaders:
- Type: 0x65a3dbe6 ## PT_OPENBSD_RANDOMIZE
- Type: 0x65a3dbe7 ## PT_OPENBSD_WXNEEDED
- Type: 0x65a3dbe8 ## PT_OPENBSD_NOBTCFI
- Type: 0x65a3dbe9 ## PT_OPENBSD_SYSCALLS
- Type: 0x65a41be6 ## PT_OPENBSD_BOOTDATA
3 changes: 3 additions & 0 deletions llvm/tools/llvm-objdump/ELFDump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,9 @@ template <class ELFT> void ELFDumper<ELFT>::printProgramHeaders() {
case ELF::PT_OPENBSD_RANDOMIZE:
outs() << "OPENBSD_RANDOMIZE ";
break;
case ELF::PT_OPENBSD_SYSCALLS:
outs() << "OPENBSD_SYSCALLS ";
break;
case ELF::PT_OPENBSD_WXNEEDED:
outs() << "OPENBSD_WXNEEDED ";
break;
Expand Down