]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[build] Allow elf2efi.c to build on FreeBSD
authorMichael Brown <mcb30@ipxe.org>
Sat, 30 Jan 2021 00:11:33 +0000 (00:11 +0000)
committerMichael Brown <mcb30@ipxe.org>
Sat, 30 Jan 2021 00:11:33 +0000 (00:11 +0000)
commitf034ae59f63b1ac279981e6de3f1e67ca8bbe3a0
tree0c8df20b16e07777ef36fe08958995f5e0982902
parent25b675c3db2120aed06f05c0b0cec4b9939d7f76
[build] Allow elf2efi.c to build on FreeBSD

The elf.h on FreeBSD defines ELF_R_TYPE and ELF_R_SYM (based on the
host platform) and omits some but not all of the AArch64 relocation
types.

Fix by undefining ELF_R_TYPE and ELF_R_SYM in favour of our own
definitions, and by placing each potentially missing relocation type
within an individual #ifdef guard.

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