From owner-svn-src-head@freebsd.org Sat Apr 9 19:09:08 2016 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 2A1CFB08CD8; Sat, 9 Apr 2016 19:09:08 +0000 (UTC) (envelope-from ian@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 EFE121679; Sat, 9 Apr 2016 19:09:07 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u39J97CO074739; Sat, 9 Apr 2016 19:09:07 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u39J97NG074738; Sat, 9 Apr 2016 19:09:07 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201604091909.u39J97NG074738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 9 Apr 2016 19:09:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297758 - head/sys/boot/arm/uboot X-SVN-Group: head 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.21 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, 09 Apr 2016 19:09:08 -0000 Author: ian Date: Sat Apr 9 19:09:06 2016 New Revision: 297758 URL: https://svnweb.freebsd.org/changeset/base/297758 Log: Align the start of the text segment to an 8-byte boundary. This fixes alignment aborts in ubldr.bin for RPi that started happening with clang 3.8 (earlier clang apparently didn't generate strd instructions that trigger the alignment fault). The abort happened in ubldr.bin and not ubldr (elf version) because the elf headers are 0xf4 bytes long, and stripping them off left everything 4-byte aligned. While here, also stop aligning the data segment to a page boundary, align it to 8 bytes instead (aligning to a page just needlessly makes the file bigger); pointed out by andrew@. Modified: head/sys/boot/arm/uboot/ldscript.arm Modified: head/sys/boot/arm/uboot/ldscript.arm ============================================================================== --- head/sys/boot/arm/uboot/ldscript.arm Sat Apr 9 18:52:09 2016 (r297757) +++ head/sys/boot/arm/uboot/ldscript.arm Sat Apr 9 19:09:06 2016 (r297758) @@ -6,6 +6,7 @@ SECTIONS { /* Read-only sections, merged into text segment: */ . = UBLDR_LOADADDR + SIZEOF_HEADERS; + . = ALIGN(8); .text : { *(.text) @@ -47,8 +48,8 @@ SECTIONS .rodata1 : { *(.rodata1) } .sdata2 : { *(.sdata2) } .sbss2 : { *(.sbss2) } - /* Adjust the address for the data segment to the next page up. */ - . = ((. + 0x1000) & ~(0x1000 - 1)); + /* Adjust the address for the data segment to the doubleword boundary. */ + . = ALIGN(8); .data : { *(.data)