Link efi programs with -pie rather than -shared

This was causing build failures in CheriBSD where we were passing -pie
already by default.

Reviewed By:	andrew
Differential Revision: https://reviews.freebsd.org/D24787
This commit is contained in:
Alex Richardson 2020-10-12 11:27:08 +00:00
parent cf084e9e92
commit 253e820a4d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=366644
2 changed files with 2 additions and 2 deletions

View File

@ -63,7 +63,7 @@ FILES= ${BOOT1}.efi
FILESMODE_${BOOT1}.efi= ${BINMODE}
LDSCRIPT= ${EFISRC}/loader/arch/${MACHINE}/ldscript.${MACHINE}
LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared
LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -pie
.if ${MACHINE_CPUARCH} == "aarch64"
CFLAGS+= -mgeneral-regs-only

View File

@ -82,7 +82,7 @@ LINKS+= ${BINDIR}/${LOADER}.efi ${BINDIR}/loader.efi
.endif
LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE}/ldscript.${MACHINE}
LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared
LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -pie
CLEANFILES+= loader.efi