2 * Copyright 2013-2014, Haiku, Inc.
3 * Distributed under the terms of the MIT License.
6 * Alexander von Gluck IV, <kallisti5@unixzen.com>
12 #include <SupportDefs.h>
13 #include <ByteOrder.h>
19 #define PE_OPTIONAL_MAGIC_PE32 0x010b
20 #define PE_OPTIONAL_MAGIC_PE32P 0x020b
24 uint16 magic
; /* == MZ_MAGIC */
25 uint16 bytesInLastBlock
;
27 uint16 numRelocations
;
28 uint16 headerParagraphs
;
29 uint16 minExtraParagraphs
;
30 uint16 maxExtraParagraphs
;
36 uint16 relocationTableOffset
;
42 uint32 lfaNew
; // PE Header start addr
46 uint32 magic
; // == PE_MAGIC */
48 uint16 numberOfSections
;
50 uint32 pointerToSymbolTable
;
51 uint32 numberOfSymbols
;
52 uint16 sizeOfOptionalHeader
;
53 uint16 characteristics
;
57 uint16 magic
; // == 0x010b - PE32, 0x020b - PE32+ (64 bit)
58 uint8 majorLinkerVersion
;
59 uint8 minorLinkerVersion
;
61 uint32 sizeOfInitializedData
;
62 uint32 sizeOfUninitializedData
;
63 uint32 addressOfEntryPoint
;
67 uint32 sectionAlignment
;
69 uint16 majorOperatingSystemVersion
;
70 uint16 minorOperatingSystemVersion
;
71 uint16 majorImageVersion
;
72 uint16 minorImageVersion
;
73 uint16 majorSubsystemVersion
;
74 uint16 minorSubsystemVersion
;
75 uint32 win32VersionValue
;
80 uint16 llCharacteristics
;
81 uint32 sizeOfStackReserve
;
82 uint32 sizeOfStackCommit
;
83 uint32 sizeOfHeapReserve
;
84 uint32 sizeOfHeapCommit
;
86 uint32 numberOfRvaAndSizes
;
89 #endif /* _PE_COMMON_H */