[PATCH] D113356: [llvm-objdump] -p: Dump PE header for PE/COFF
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 6 17:40:56 PDT 2021
MaskRay created this revision.
MaskRay added reviewers: jhenderson, mstorsjo.
Herald added subscribers: pengfei, rupprecht.
MaskRay requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
For a triple DLL built with `clang --target=x86_64-windows -O2 -c a.c; lld-link -subsystem:console -dll a.o -out:a.dll`,
`objdump -p` vs `llvm-objdump -p`:
-a.dll: file format pei-x86-64
-
+a.dll: file format coff-x86-64
Characteristics 0x2022
executable
large address aware
@@ -57,4 +56,4 @@
Entry d 0000000000000000 00000000 Delay Import Directory
Entry e 0000000000000000 00000000 CLR Runtime Header
Entry f 0000000000000000 00000000 Reserved
-
+Export Table:
For a Linux image (`vmlinuz-5.10.76-gentoo-r1`) built with `CONFIG_EFI_STUB=y`
(https://www.kernel.org/doc/html/latest/admin-guide/efi-stub.html):
-vmlinuz-5.10.76-gentoo-r1: file format pei-x86-64
-
-Characteristics 0x20e
+vmlinuz-5.10.76-gentoo-r1: file format coff-x86-64
+Characteristics 0x206
executable
line numbers stripped
- symbols stripped
debugging information removed
Time/Date Wed Dec 31 16:00:00 1969
@@ -55,10 +53,4 @@
Entry d 0000000000000000 00000000 Delay Import Directory
Entry e 0000000000000000 00000000 CLR Runtime Header
Entry f 0000000000000000 00000000 Reserved
-
-
-PE File Base Relocations (interpreted .reloc section contents)
-
-Virtual Address: 000037ca Chunk size 10 (0xa) Number of fixups 1
- reloc 0 offset 0 [37ca] ABSOLUTE
-
+Export Table:
`symbols stripped` looks like a GNU objdump problem.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D113356
Files:
llvm/test/tools/llvm-objdump/COFF/private-headers-old.test
llvm/test/tools/llvm-objdump/COFF/private-headers.test
llvm/test/tools/llvm-objdump/COFF/private-headers.yaml
llvm/tools/llvm-objdump/COFFDump.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D113356.385315.patch
Type: text/x-patch
Size: 21142 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211107/86c546c3/attachment.bin>
More information about the llvm-commits
mailing list