From owner-svn-src-head@freebsd.org Sat Jul 1 18:48:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34BBAD900C9; Sat, 1 Jul 2017 18:48:17 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E6C2C6E168; Sat, 1 Jul 2017 18:48:16 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v61ImG0X053878; Sat, 1 Jul 2017 18:48:16 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v61ImFlR053875; Sat, 1 Jul 2017 18:48:15 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201707011848.v61ImFlR053875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 1 Jul 2017 18:48:15 +0000 (UTC) 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 X-SVN-Group: head X-SVN-Commit-Author: emaste X-SVN-Commit-Paths: in head/sys/boot: arm/uboot efi/boot1 efi/loader X-SVN-Commit-Revision: 320547 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Jul 2017 18:48:17 -0000 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