For a trivial 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.
Here and the other zero-valued fields, it might be advisable to use a non-zero value, to avoid any instances of variables not actually being assigned values properly (e.g. they were assigned to the wrong value/the wrong variable was assigned this variable's value etc).