[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>
pull/117/head
Michael Brown 2020-06-26 21:21:31 +01:00
parent 8a1d66c7ae
commit decee20ec8
1 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,9 @@
# -*- makefile -*- : Force emacs to use Makefile mode
# Avoid untranslatable relocations
#
CFLAGS += -fno-pic
# Specify EFI image builder
#
ELF2EFI = $(ELF2EFI64)