Go to the documentation of this file.
16#ifndef LIEF_PE_DOS_HEADER_H
17#define LIEF_PE_DOS_HEADER_H
40 using reserved_t = std::array<uint16_t, 4>;
41 using reserved2_t = std::array<uint16_t, 10>;
43 static constexpr uint16_t MAGIC = 0x5a4d;
53 uint16_t
magic()
const {
60 return used_bytes_in_last_page_;
64 return file_sz_in_pages_;
68 return nb_relocations_;
72 return header_sz_in_paragraphs_;
76 return min_extra_paragraphs_;
80 return max_extra_paragraphs_;
84 return init_relative_ss_;
104 return addr_reloc_table_;
108 return overlay_number_;
129 return addr_new_exe_header_;
137 used_bytes_in_last_page_ = value;
141 file_sz_in_pages_ = value;
145 nb_relocations_ = value;
149 header_sz_in_paragraphs_ = value;
153 min_extra_paragraphs_ = value;
157 max_extra_paragraphs_ = value;
161 init_relative_ss_ = value;
177 init_rel_cs_ = value;
181 addr_reloc_table_ = value;
185 overlay_number_ = value;
189 reserved_ = reserved;
201 reserved2_ = reserved2;
205 addr_new_exe_header_ = value;
208 void accept(Visitor& visitor)
const override;
215 DosHeader() =
default;
218 uint16_t used_bytes_in_last_page_ = 0;
219 uint16_t file_sz_in_pages_ = 0;
220 uint16_t nb_relocations_ = 0;
221 uint16_t header_sz_in_paragraphs_ = 0;
222 uint16_t min_extra_paragraphs_ = 0;
223 uint16_t max_extra_paragraphs_ = 0;
224 uint16_t init_relative_ss_ = 0;
225 uint16_t init_sp_ = 0;
226 uint16_t checksum_ = 0;
227 uint16_t init_ip_ = 0;
228 uint16_t init_rel_cs_ = 0;
229 uint16_t addr_reloc_table_ = 0;
230 uint16_t overlay_number_ = 0;
231 reserved_t reserved_;
232 uint16_t oem_id_ = 0;
233 uint16_t oem_info_ = 0;
234 reserved2_t reserved2_;
235 uint32_t addr_new_exe_header_ = 0;