aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/boot1/Makefile
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2022-02-02 20:18:43 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2022-02-02 20:18:43 +0000
commit8bd5e2f15cc9756e7d6b7feb43ec47f18a38e2bf (patch)
tree23abf671e8144f73c15a5d2380bcbe7dc545990e /stand/efi/boot1/Makefile
parent6ad26abca5389bc1cc74d6e533fb317df6ab5f89 (diff)
downloadsrc-8bd5e2f15cc9756e7d6b7feb43ec47f18a38e2bf.tar.gz
src-8bd5e2f15cc9756e7d6b7feb43ec47f18a38e2bf.zip
stand/efi: Pass --no-dynamic-linker to ld.bfd >= 2.34.
ld.bfd in binutils 2.34+ now reports an error in more cases for custom ldscripts that do not place PHDRs in a LOAD segment. However, EFI binaries are not dynamic binaries which need PHDRs, so pass --no-dynamic-linker to disable this check. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D34124
Diffstat (limited to 'stand/efi/boot1/Makefile')
-rw-r--r--stand/efi/boot1/Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile
index af03e395b2a5..7e3d762c768d 100644
--- a/stand/efi/boot1/Makefile
+++ b/stand/efi/boot1/Makefile
@@ -67,6 +67,9 @@ FILESMODE_${BOOT1}.efi= ${BINMODE}
LDSCRIPT= ${EFISRC}/loader/arch/${MACHINE}/ldscript.${MACHINE}
LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -pie
+.if ${LINKER_TYPE} == "bfd" && ${LINKER_VERSION} >= 23400
+LDFLAGS+= -Wl,--no-dynamic-linker
+.endif
.if ${MACHINE_CPUARCH} == "aarch64"
CFLAGS+= -mgeneral-regs-only