diff options
author | Michael Brown <mcb30@ipxe.org> | 2020-06-26 21:21:31 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2020-06-27 21:47:04 +0100 |
commit | decee20ec84977ae1d1a7f54fa91e73017f6731d (patch) | |
tree | fa1f1dca790984f992d8ac4be426a2c062f86554 | |
parent | 8a1d66c7aec020f3e90254ed2fa55ecd9494fcc3 (diff) | |
download | ipxe-decee20ec84977ae1d1a7f54fa91e73017f6731d.zip ipxe-decee20ec84977ae1d1a7f54fa91e73017f6731d.tar.gz ipxe-decee20ec84977ae1d1a7f54fa91e73017f6731d.tar.bz2 |
[build] Disable position-independent code for ARM64 EFI builds
Some versions of gcc (observed with the cross-compiling gcc 9.3.0 in
Ubuntu 20.04) default to enabling -fPIE. Experimentation shows that
this results in the emission of R_AARCH64_ADR_GOT_PAGE relocation
records for __stack_chk_guard. These relocation types are not
supported by elf2efi.c.
Fix by explicitly disabling position-independent code for ARM64 EFI
builds.
Debugged-by: Antony Messerli <antony@mes.ser.li>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r-- | src/arch/arm64/Makefile.efi | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/arch/arm64/Makefile.efi b/src/arch/arm64/Makefile.efi index 998a64d..eb04c0e 100644 --- a/src/arch/arm64/Makefile.efi +++ b/src/arch/arm64/Makefile.efi @@ -1,5 +1,9 @@ # -*- makefile -*- : Force emacs to use Makefile mode +# Avoid untranslatable relocations +# +CFLAGS += -fno-pic + # Specify EFI image builder # ELF2EFI = $(ELF2EFI64) |