bump image size

This commit is contained in:
Folkert 2022-10-02 15:39:24 +02:00
parent a798552dee
commit 06e24fb44f
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -662,6 +662,15 @@ impl Preprocessor {
.size_of_headers
.set(LE, self.new_headers_size as u32);
// this is required to run the intermediate product, the final surgery process will
// overwrite this again. But we want to run the intermediate product (the preprocessedhost)
// to be runnable for debugging purposes.
nt_headers.optional_header.size_of_image.set(
LE,
nt_headers.optional_header.size_of_image.get(LE)
+ (self.section_alignment * extra_sections.len()) as u32,
);
// update the section file offsets
//
// Sections: