mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 11:14:18 +01:00
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
This commit is contained in:
parent
6ad26abca5
commit
8bd5e2f15c
@ -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
|
||||
|
@ -99,6 +99,9 @@ LINKS+= ${BINDIR}/${LOADER}.efi ${BINDIR}/loader.efi
|
||||
|
||||
LDSCRIPT= ${.CURDIR}/../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
|
||||
|
||||
CLEANFILES+= loader.efi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user