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

Reference: https://github.com/openbsd/src/blob/master/sys/sys/exec_elf.h
This commit is contained in:
Frederic Cambus 2024-02-20 09:11:54 +01:00 committed by GitHub
parent 914e607487
commit 1b89486486
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 0 deletions

View File

@ -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 ---
@ -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

View File

@ -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;