]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[build] Disable position-independent code for ARM64 EFI builds
authorMichael Brown <mcb30@ipxe.org>
Fri, 26 Jun 2020 20:21:31 +0000 (21:21 +0100)
committerMichael Brown <mcb30@ipxe.org>
Sat, 27 Jun 2020 20:47:04 +0000 (21:47 +0100)
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>
src/arch/arm64/Makefile.efi

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