38 using signature_t = std::array<uint8_t, 4>;
70 RELOCS_STRIPPED = 0x0001,
71 EXECUTABLE_IMAGE = 0x0002,
72 LINE_NUMS_STRIPPED = 0x0004,
73 LOCAL_SYMS_STRIPPED = 0x0008,
74 AGGRESSIVE_WS_TRIM = 0x0010,
75 LARGE_ADDRESS_AWARE = 0x0020,
76 BYTES_REVERSED_LO = 0x0080,
77 NEED_32BIT_MACHINE = 0x0100,
78 DEBUG_STRIPPED = 0x0200,
79 REMOVABLE_RUN_FROM_SWAP = 0x0400,
80 NET_RUN_FROM_SWAP = 0x0800,
83 UP_SYSTEM_ONLY = 0x4000,
84 BYTES_REVERSED_HI = 0x8000
88 Header(
const details::pe_header& header);
112 return timedatestamp_;
119 return pointerto_symtab_;
138 return sizeof_opt_header_;
143 return characteristics_;
148 return (characteristics() &
static_cast<uint32_t
>(c)) > 0;
158 void numberof_sections(uint16_t nb) {
162 void time_date_stamp(uint32_t timestamp) {
163 timedatestamp_ = timestamp;
166 void pointerto_symbol_table(uint32_t ptr) {
167 pointerto_symtab_ = ptr;
170 void numberof_symbols(uint32_t nb) {
174 void sizeof_optional_header(uint16_t size) {
175 sizeof_opt_header_ = size;
178 void characteristics(uint32_t characteristics) {
179 characteristics_ = characteristics;
182 void signature(
const signature_t& sig) {
186 void add_characteristic(CHARACTERISTICS c) {
187 characteristics_ |=
static_cast<uint32_t
>(c);
190 void remove_characteristic(CHARACTERISTICS c) {
191 characteristics_ &= ~static_cast<uint32_t>(c);
194 void accept(Visitor& visitor)
const override;
196 LIEF_API
friend std::ostream& operator<<(std::ostream& os,
const Header& entry);
200 signature_t signature_;
201 MACHINE_TYPES machine_ = MACHINE_TYPES::UNKNOWN;
202 uint16_t nb_sections_ = 0;
203 uint32_t timedatestamp_ = 0;
204 uint32_t pointerto_symtab_;
205 uint32_t nb_symbols_ = 0;
206 uint16_t sizeof_opt_header_ = 0;
207 uint32_t characteristics_ = 0;