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:
parent
cf084e9e92
commit
253e820a4d
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user