]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Shrink size of data directory in PE header
authorMichael Brown <mcb30@ipxe.org>
Mon, 10 Apr 2023 15:44:36 +0000 (16:44 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 10 Apr 2023 15:51:49 +0000 (16:51 +0100)
commit1e4c3789e95393a1b87a0b2147bed82a87576673
tree4b72fe41af32adf6630a659bb14dacea1eab6617
parent0d04635ef0e4fa0850716c03163e120c63125df7
[efi] Shrink size of data directory in PE header

Hybrid bzImage and UEFI binaries (such as wimboot) require the PE
header to be kept as small as possible, since the bzImage header
starts at a fixed offset 0x1f1.

The EFI_IMAGE_OPTIONAL_HEADER structures in PeImage.h define an
optional header containing 16 data directory entries, of which the
last eight are unused in binaries that we create.  Shrink the data
directory to contain only the first eight entries, to minimise the
overall size of the PE header.

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