Date: Sat, 1 Jul 2017 18:48:15 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320547 - in head/sys/boot: arm/uboot efi/boot1 efi/loader Message-ID: <201707011848.v61ImFlR053875@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Sat Jul 1 18:48:15 2017 New Revision: 320547 URL: https://svnweb.freebsd.org/changeset/base/320547 Log: Link EFI/uboot loaders with -znotext By default LLD links with relocations disallowed against readonly sections (e.g., .text), but the 32-bit ARM EFI & uboot boot bits require such relocations. -znotext is either ignored as an unknown -z option (in-tree lld 2.17.50) or is already the default (GNU ld or GNU gold from ports) so we can just add it unconditionally to allow building with LLD. This is similar to the change in r320179 for the kernel link. Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/arm/uboot/Makefile head/sys/boot/efi/boot1/Makefile head/sys/boot/efi/loader/Makefile Modified: head/sys/boot/arm/uboot/Makefile ============================================================================== --- head/sys/boot/arm/uboot/Makefile Sat Jul 1 16:42:09 2017 (r320546) +++ head/sys/boot/arm/uboot/Makefile Sat Jul 1 18:48:15 2017 (r320547) @@ -100,6 +100,7 @@ CLEANFILES+= loader.help CFLAGS+= -ffreestanding -msoft-float LDFLAGS= -nostdlib -static -T ${.CURDIR}/ldscript.${MACHINE_CPUARCH} +LDFLAGS+= -Wl,-znotext # Pull in common loader code .PATH: ${.CURDIR}/../../uboot/common Modified: head/sys/boot/efi/boot1/Makefile ============================================================================== --- head/sys/boot/efi/boot1/Makefile Sat Jul 1 16:42:09 2017 (r320546) +++ head/sys/boot/efi/boot1/Makefile Sat Jul 1 18:48:15 2017 (r320547) @@ -68,7 +68,7 @@ FILES= boot1.efi boot1.efifat FILESMODE_boot1.efi= ${BINMODE} LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE}/ldscript.${MACHINE} -LDFLAGS+= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared +LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared .if ${MACHINE_CPUARCH} == "aarch64" CFLAGS+= -mgeneral-regs-only Modified: head/sys/boot/efi/loader/Makefile ============================================================================== --- head/sys/boot/efi/loader/Makefile Sat Jul 1 16:42:09 2017 (r320546) +++ head/sys/boot/efi/loader/Makefile Sat Jul 1 18:48:15 2017 (r320547) @@ -116,7 +116,7 @@ FILES+= loader.efi FILESMODE_loader.efi= ${BINMODE} LDSCRIPT= ${.CURDIR}/arch/${MACHINE}/ldscript.${MACHINE} -LDFLAGS+= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared +LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared CLEANFILES+= loader.efi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707011848.v61ImFlR053875>