]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Do not assume canonical PE section ordering
authorMichael Brown <mcb30@ipxe.org>
Fri, 24 Nov 2023 15:55:41 +0000 (15:55 +0000)
committerMichael Brown <mcb30@ipxe.org>
Fri, 24 Nov 2023 16:45:11 +0000 (16:45 +0000)
commit03ff1bb99a28230397fb583853ab2160ff227e77
treee820b89dd53c6e9c9572aaf5d059054f759aec87
parent18582a05fc65fc8835220c27528ef8902f5da60e
[efi] Do not assume canonical PE section ordering

The BaseOfCode (and, in PE32, BaseOfData) fields imply an assumption
that binaries are laid out as code followed by initialised data
followed by uninitialised data.  This assumption may not be valid for
complex binaries such as wimboot.

Remove this implicit assumption, and use arguably justifiable values
for the assorted summary start and size fields within the PE headers.

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