]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Treat writable sections as data sections
authorMichael Brown <mcb30@ipxe.org>
Wed, 22 Nov 2023 23:14:38 +0000 (23:14 +0000)
committerMichael Brown <mcb30@ipxe.org>
Thu, 23 Nov 2023 13:20:21 +0000 (13:20 +0000)
commit678a60f61d76b6fce2d9e3b323db1892f69800d3
tree5d0aeb509fc82aad98f2fd1aceeae43242d5491a
parent8c8ead25305bbe9521b488144257c131abbbcd23
[efi] Treat writable sections as data sections

Hybrid bzImage and UEFI binaries (such as wimboot) may include 16-bit
executable code that is opaque data from the perspective of a UEFI PE
binary, as described in wimboot commit fe456ca ("[efi] Use separate
.text and .data PE sections").

The ELF section will be marked as containing both executable code and
writable data.  Choose to treat such a section as a data section
rather than a code section, since that matches the expected semantics
for ELF files that we expect to process.

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