11 dw 8664h ; machine type: x86-64
12 dw 1 ; number of sections
14 dd 0 ; offset to symbol table
15 dd 0 ; number of symbols
16 dw opthdr_end - opthdr ; size of optional header
17 dw 2022h ; characteristics: DLL, exec image, can handle > 2gb addr
18 ; optional header - standard fields
19 opthdr: dw 020bh ; magic: PE32+
21 dd prog_end - prog ; size of code
22 dd 0 ; size of init data
23 dd 0 ; size of uninit data
25 dd prog ; base of code
26 ; optional header - windows-specific fields
27 dq 100000h ; image base
28 dd 4096 ; section alignment
29 dd 4096 ; file alignment
34 dd image_end ; size of image
35 dd prog ; size of headers
37 dw 10 ; subsystem: EFI application
38 dw 0040h ; DLL characteristics: relocatable at runtime
39 dq 4096 ; size of stack reserve
40 dq 4096 ; size of stack commit
41 dq 4096 ; size of heap reserve
42 dq 0 ; size of heap commit
44 dd 0 ; number of rva and sizes
49 dd image_end - prog ; virtual size
50 dd prog ; virtual address
51 dd image_end - prog ; raw data size
53 dd 0 ; relocations offset
54 dd 0 ; line numbers offset
56 dw 0 ; num line numbers
57 dd 60000020h ; characteristics: exec, readable, code