From owner-svn-src-all@freebsd.org Thu Jan 18 22:46:48 2018 Return-Path: Delivered-To: svn-src-all@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 74E4BEC81B3; Thu, 18 Jan 2018 22:46:48 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FBFD2A16; Thu, 18 Jan 2018 22:46:48 +0000 (UTC) (envelope-from kevans@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 99A1B24D99; Thu, 18 Jan 2018 22:46:47 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0IMkl0c040741; Thu, 18 Jan 2018 22:46:47 GMT (envelope-from kevans@FreeBSD.org) Received: (from kevans@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0IMklJw040739; Thu, 18 Jan 2018 22:46:47 GMT (envelope-from kevans@FreeBSD.org) Message-Id: <201801182246.w0IMklJw040739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevans set sender to kevans@FreeBSD.org using -f From: Kyle Evans Date: Thu, 18 Jan 2018 22:46:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r328156 - in head/stand: arm/uboot efi/loader/arch/arm X-SVN-Group: head X-SVN-Commit-Author: kevans X-SVN-Commit-Paths: in head/stand: arm/uboot efi/loader/arch/arm X-SVN-Commit-Revision: 328156 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2018 22:46:48 -0000 Author: kevans Date: Thu Jan 18 22:46:47 2018 New Revision: 328156 URL: https://svnweb.freebsd.org/changeset/base/328156 Log: stand: Move sections around to fix stand/ build with ld.lld on armv7 When building loader bits, lld fails with the following error: "ld: error: section: .dynamic is not contiguous with other relro sections" on both ubldr and EFI loader. Move .dynamic up to make ld.lld happy, adjust .got as necessary for ubldr. Tested on: OrangePi One (ld.lld, ubldr) Tested on: Banana Pi-M3 (ld.lld, ubldr) Tested on: qemu-armv7 (ld.lld, EFI) Tested on: qemu-armv7 (ld.bfd, EFI) Tested on: Raspberry Pi 2 (ld.bfd, ubldr) [manu] Tested on: Banana Pi-M2 (ld.bfd, ubldr) [manu] Reviewed by: andrew, emaste, imp Differential Revision: https://reviews.freebsd.org/D13942 Modified: head/stand/arm/uboot/ldscript.arm head/stand/efi/loader/arch/arm/ldscript.arm Modified: head/stand/arm/uboot/ldscript.arm ============================================================================== --- head/stand/arm/uboot/ldscript.arm Thu Jan 18 22:23:16 2018 (r328155) +++ head/stand/arm/uboot/ldscript.arm Thu Jan 18 22:46:47 2018 (r328156) @@ -32,6 +32,11 @@ SECTIONS .rela.got : { *(.rela.got) } .rela.got1 : { *(.rela.got1) } .rela.got2 : { *(.rela.got2) } + .dynamic : { *(.dynamic) } + PROVIDE (_GOT_START_ = .); + .got : { *(.got) } + .got.plt : { *(.got.plt) } + PROVIDE (_GOT_END_ = .); .rela.ctors : { *(.rela.ctors) } .rela.dtors : { *(.rela.dtors) } .rela.init : { *(.rela.init) } @@ -58,7 +63,6 @@ SECTIONS } .data1 : { *(.data1) } .got1 : { *(.got1) } - .dynamic : { *(.dynamic) } /* Put .ctors and .dtors next to the .got2 section, so that the pointers get relocated with -mrelocatable. Also put in the .fixup pointers. The current compiler no longer needs this, but keep it around for 2.7.2 */ @@ -74,10 +78,6 @@ SECTIONS .fixup : { *(.fixup) } PROVIDE (_FIXUP_END_ = .); PROVIDE (_GOT2_END_ = .); - PROVIDE (_GOT_START_ = .); - .got : { *(.got) } - .got.plt : { *(.got.plt) } - PROVIDE (_GOT_END_ = .); /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ Modified: head/stand/efi/loader/arch/arm/ldscript.arm ============================================================================== --- head/stand/efi/loader/arch/arm/ldscript.arm Thu Jan 18 22:23:16 2018 (r328155) +++ head/stand/efi/loader/arch/arm/ldscript.arm Thu Jan 18 22:46:47 2018 (r328156) @@ -35,6 +35,7 @@ SECTIONS . = ALIGN(4); PROVIDE (__bss_end = .); } + .dynamic : { *(.dynamic) } /* We want the small data sections together, so single-instruction offsets can access them all, and initialized data all before uninitialized, so we can shorten the on-disk segment size. */ @@ -54,7 +55,6 @@ SECTIONS } __gp = .; .plt : { *(.plt) } - .dynamic : { *(.dynamic) } .reloc : { *(.reloc) } .dynsym : { *(.dynsym) } .dynstr : { *(.dynstr) }