drivers/wifi: Remove unnecessary data structure copy
[coreboot2.git] / util / cbfstool / coff.h
blob37cbfd3ddb00c7980a0224ec8c346867276a0e7e
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #define DOS_MAGIC 0x5a4d
4 typedef struct {
5 uint16_t signature;
6 uint16_t lastsize;
7 uint16_t nblocks;
8 uint16_t nreloc;
9 uint16_t hdrsize;
10 uint16_t minalloc;
11 uint16_t maxalloc;
12 uint16_t ss;
13 uint16_t sp;
14 uint16_t checksum;
15 uint16_t ip;
16 uint16_t cs;
17 uint16_t relocpos;
18 uint16_t noverlay;
19 uint16_t reserved1[4];
20 uint16_t oem_id;
21 uint16_t oem_info;
22 uint16_t reserved2[10];
23 uint32_t e_lfanew;
24 } dos_header_t;
26 #define MACHINE_TYPE_X86 0x014c
27 #define MACHINE_TYPE_X64 0x8664
28 #define MACHINE_TYPE_ARM64 0xAA64
29 typedef struct {
30 uint8_t signature[4];
31 uint16_t machine;
32 uint16_t num_sections;
33 uint32_t timestamp;
34 uint32_t symboltable;
35 uint32_t num_symbols;
36 uint16_t opt_header_size;
37 uint16_t characteristics;
38 } coff_header_t;
40 #define PE_HDR_32_MAGIC 0x10b
41 typedef struct {
42 uint16_t signature;
43 uint8_t major_linker_version;
44 uint8_t minor_linker_version;
45 uint32_t code_size;
46 uint32_t data_size;
47 uint32_t bss_size;
48 uint32_t entry_point;
49 uint32_t code_offset;
50 uint32_t data_offset;
51 uint32_t image_addr;
52 uint32_t section_alignment;
53 uint32_t file_alignment;
54 uint16_t major_os_version;
55 uint16_t minor_os_version;
56 uint16_t major_image_version;
57 uint16_t minor_image_version;
58 uint16_t major_subsystem_version;
59 uint16_t minor_subsystem_version;
60 uint32_t reserved;
61 uint32_t image_size;
62 uint32_t header_size;
63 uint32_t checksum;
64 uint16_t subsystem;
65 uint16_t characteristics;
66 uint32_t stack_reserve_size;
67 uint32_t stack_commit_size;
68 uint32_t heap_reserve_size;
69 uint32_t heap_commit_size;
70 uint32_t loader_flags;
71 uint32_t number_of_va_and_sizes;
72 /* data directory not needed */
73 } pe_opt_header_32_t;
75 #define PE_HDR_64_MAGIC 0x20b
76 typedef struct {
77 uint16_t signature;
78 uint8_t major_linker_version;
79 uint8_t minor_linker_version;
80 uint32_t code_size;
81 uint32_t data_size;
82 uint32_t bss_size;
83 uint32_t entry_point;
84 uint32_t code_offset;
85 uint64_t image_addr;
86 uint32_t section_alignment;
87 uint32_t file_alignment;
88 uint16_t major_os_version;
89 uint16_t minor_os_version;
90 uint16_t major_image_version;
91 uint16_t minor_image_version;
92 uint16_t major_subsystem_version;
93 uint16_t minor_subsystem_version;
94 uint32_t reserved;
95 uint32_t image_size;
96 uint32_t header_size;
97 uint32_t checksum;
98 uint16_t subsystem;
99 uint16_t characteristics;
100 uint64_t stack_reserve_size;
101 uint64_t stack_commit_size;
102 uint64_t heap_reserve_size;
103 uint64_t heap_commit_size;
104 uint32_t loader_flags;
105 uint32_t number_of_va_and_sizes;
106 /* data directory not needed */
107 } pe_opt_header_64_t;