[PATCH] D27456: [llvm-readobj] - Teach readobj to print PT_OPENBSD_BOOTDATA header
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 6 10:06:12 PST 2016
This revision was automatically updated to reflect the committed changes.
Closed by commit rL288831: [llvm-readobj] - Teach readobj to print PT_OPENBSD_BOOTDATA header (authored by grimar).
Changed prior to commit:
https://reviews.llvm.org/D27456?vs=80435&id=80440#toc
Repository:
rL LLVM
https://reviews.llvm.org/D27456
Files:
llvm/trunk/test/Object/Inputs/openbsd-phdrs.elf-x86-64
llvm/trunk/test/tools/llvm-readobj/program-headers.test
llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
Index: llvm/trunk/test/tools/llvm-readobj/program-headers.test
===================================================================
--- llvm/trunk/test/tools/llvm-readobj/program-headers.test
+++ llvm/trunk/test/tools/llvm-readobj/program-headers.test
@@ -13,7 +13,10 @@
##
## test.s is an empty file.
## linker.script:
-## PHDRS { text PT_LOAD FILEHDR PHDRS; foo 0x65a3dbe6; bar 0x65a3dbe7; }
+## PHDRS { text PT_LOAD FILEHDR PHDRS; foo 0x65a3dbe6; bar 0x65a3dbe7; zed 0x65a41be6; }
+## Where 0x65a3dbe6 is the value of PT_OPENBSD_RANDOMIZE,
+## 0x65a3dbe7 is the value of PT_OPENBSD_WXNEEDED,
+## 0x65a41be6 is the value of PT_OPENBSD_BOOTDATA
## SECTIONS { . = SIZEOF_HEADERS; .all : { *(.*) } : text }
RUN: llvm-readobj -program-headers %p/../../Object/Inputs/openbsd-phdrs.elf-x86-64 \
RUN: | FileCheck %s -check-prefix OPENBSD-X86-64
@@ -175,3 +178,14 @@
OPENBSD-X86-64-NEXT: ]
OPENBSD-X86-64-NEXT: Alignment:
OPENBSD-X86-64-NEXT: }
+OPENBSD-X86-64-NEXT: ProgramHeader {
+OPENBSD-X86-64-NEXT: Type: PT_OPENBSD_BOOTDATA
+OPENBSD-X86-64-NEXT: Offset:
+OPENBSD-X86-64-NEXT: VirtualAddress:
+OPENBSD-X86-64-NEXT: PhysicalAddress:
+OPENBSD-X86-64-NEXT: FileSize:
+OPENBSD-X86-64-NEXT: MemSize:
+OPENBSD-X86-64-NEXT: Flags [
+OPENBSD-X86-64-NEXT: ]
+OPENBSD-X86-64-NEXT: Alignment:
+OPENBSD-X86-64-NEXT: }
Index: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
===================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
@@ -1160,6 +1160,7 @@
LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_RANDOMIZE);
LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_WXNEEDED);
+ LLVM_READOBJ_ENUM_CASE(ELF, PT_OPENBSD_BOOTDATA);
default: return "";
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27456.80440.patch
Type: text/x-patch
Size: 1816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161206/8b5b1e25/attachment.bin>
More information about the llvm-commits
mailing list