[PATCH] D34836: [llvm-readobj] Include the PE magic value in printouts
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 29 14:27:38 PDT 2017
mstorsjo updated this revision to Diff 104738.
mstorsjo added a comment.
Added a check for this value in an existing test.
https://reviews.llvm.org/D34836
Files:
test/tools/llvm-readobj/peplus.test
tools/llvm-readobj/COFFDumper.cpp
Index: tools/llvm-readobj/COFFDumper.cpp
===================================================================
--- tools/llvm-readobj/COFFDumper.cpp
+++ tools/llvm-readobj/COFFDumper.cpp
@@ -678,6 +678,7 @@
template <class PEHeader>
void COFFDumper::printPEHeader(const PEHeader *Hdr) {
DictScope D(W, "ImageOptionalHeader");
+ W.printHex ("Magic", Hdr->Magic);
W.printNumber("MajorLinkerVersion", Hdr->MajorLinkerVersion);
W.printNumber("MinorLinkerVersion", Hdr->MinorLinkerVersion);
W.printNumber("SizeOfCode", Hdr->SizeOfCode);
Index: test/tools/llvm-readobj/peplus.test
===================================================================
--- test/tools/llvm-readobj/peplus.test
+++ test/tools/llvm-readobj/peplus.test
@@ -16,6 +16,7 @@
CHECK: ]
CHECK: }
CHECK: ImageOptionalHeader {
+CHECK: Magic: 0x20B
CHECK: MajorLinkerVersion: 11
CHECK: MinorLinkerVersion: 0
CHECK: SizeOfCode: 512
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34836.104738.patch
Type: text/x-patch
Size: 922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170629/38f47e31/attachment.bin>
More information about the llvm-commits
mailing list