Index: head/stand/efi/boot1/Makefile =================================================================== --- head/stand/efi/boot1/Makefile +++ head/stand/efi/boot1/Makefile @@ -63,7 +63,7 @@ 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 Index: head/stand/efi/loader/Makefile =================================================================== --- head/stand/efi/loader/Makefile +++ head/stand/efi/loader/Makefile @@ -82,7 +82,7 @@ .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