]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Use load memory address as file offset for hybrid binaries
authorMichael Brown <mcb30@ipxe.org>
Wed, 22 Nov 2023 14:57:05 +0000 (14:57 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 23 Nov 2023 13:37:47 +0000 (13:37 +0000)
commitb30a0987e239baf4689adbf79035b7f737eef873
tree39b01f9309f44962c618024b9dfaa901b66c20ba
parent3d8a614657e68fb6cb7241397bc14cb5b9a7c0b8
[efi] Use load memory address as file offset for hybrid binaries

Hybrid bzImage and UEFI binaries (such as wimboot) may be loaded as a
single contiguous blob without reference to the PE headers, and the
placement of sections within the PE file must therefore be known at
link time.

Use the load memory address (extracted from the ELF program headers)
to determine the physical placement of the section within the PE file
when generating a hybrid binary.

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