|
@@ -614,8 +614,11 @@ static void write_pe_file ( struct pe_header *pe_header,
|
614
|
614
|
struct pe_section *section;
|
615
|
615
|
unsigned long fpos = 0;
|
616
|
616
|
|
|
617
|
+ /* Align length of headers */
|
|
618
|
+ fpos = pe_header->nt.OptionalHeader.SizeOfHeaders =
|
|
619
|
+ efi_file_align ( pe_header->nt.OptionalHeader.SizeOfHeaders );
|
|
620
|
+
|
617
|
621
|
/* Assign raw data pointers */
|
618
|
|
- fpos = efi_file_align ( pe_header->nt.OptionalHeader.SizeOfHeaders );
|
619
|
622
|
for ( section = pe_sections ; section ; section = section->next ) {
|
620
|
623
|
if ( section->hdr.SizeOfRawData ) {
|
621
|
624
|
section->hdr.PointerToRawData = fpos;
|