]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Fix recorded overall size of headers in NT optional header
authorMichael Brown <mcb30@ipxe.org>
Thu, 23 Nov 2023 14:54:12 +0000 (14:54 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 23 Nov 2023 15:07:46 +0000 (15:07 +0000)
commitb37d89db90566cc1dcab9fe5713bde142fbc8f63
tree7a902fd7bf5e0a670caa745d9b21e6ddd66a8c76
parentcc858acd3205b18934ffff19ac55f8987e9c6135
[efi] Fix recorded overall size of headers in NT optional header

Commit 1e4c378 ("[efi] Shrink size of data directory in PE header")
reduced the number of entries used in the data directory and reduced
the recorded size of the NT "optional" header, but did not also adjust
the recorded overall size of the PE headers, resulting in unused space
between the PE headers and the first section.

Fix by reducing the initial recorded size of the PE headers by the
size of the omitted data directory entries.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/util/elf2efi.c