summaryrefslogtreecommitdiffstats
path: root/src/include/elf.h
diff options
context:
space:
mode:
authorMichael Brown2023-04-05 14:29:29 +0200
committerMichael Brown2023-04-10 17:51:51 +0200
commit9fb28080d97fac1061660befacfad8caaa2bc522 (patch)
tree98d57b8bfb4b7621298e310cae09a17c3d009f21 /src/include/elf.h
parent[efi] Shrink size of data directory in PE header (diff)
downloadipxe-9fb28080d97fac1061660befacfad8caaa2bc522.tar.gz
ipxe-9fb28080d97fac1061660befacfad8caaa2bc522.tar.xz
ipxe-9fb28080d97fac1061660befacfad8caaa2bc522.zip
[efi] Allow elf2efi to be used for hybrid binaries
Hybrid 32-bit BIOS and 64-bit UEFI binaries (such as wimboot) may include R_X86_64_32 relocation records for the 32-bit BIOS portions. These should be ignored when generating PE relocation records, since they apply only to code that cannot be executed within the context of the 64-bit UEFI binary, and creating a 4-byte relocation record is invalid in a binary that may be relocated anywhere within the 64-bit address space (see commit 907cffb "[efi] Disallow R_X86_64_32 relocations"). Add a "--hybrid" option to elf2efi, which will cause R_X86_64_32 relocation records to be silently discarded. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/elf.h')
0 files changed, 0 insertions, 0 deletions