From owner-svn-src-stable@freebsd.org Tue Jan 17 19:19:31 2017 Return-Path: Delivered-To: svn-src-stable@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 3ED8ECB3E7D; Tue, 17 Jan 2017 19:19:31 +0000 (UTC) (envelope-from gonzo@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 D2A5914E8; Tue, 17 Jan 2017 19:19:30 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v0HJJTJc002910; Tue, 17 Jan 2017 19:19:29 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v0HJJTe9002907; Tue, 17 Jan 2017 19:19:29 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201701171919.v0HJJTe9002907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 17 Jan 2017 19:19:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r312349 - in stable/11/sys/boot/efi: . loader/arch/arm X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2017 19:19:31 -0000 Author: gonzo Date: Tue Jan 17 19:19:29 2017 New Revision: 312349 URL: https://svnweb.freebsd.org/changeset/base/312349 Log: MFC r311888, r311890-r311891 r311888: [efi] Fix off-by-one error in ARM .bss zeroing code in loader's _start __bss_end should not be included in .bss zeroing code. Otherwise first 4 bytes of the section that follows .bss (in loader's case it's .sdata) are overwritten by zero. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D9108 r311890: [efi] Fix .rel.data.* being erroneously merged into .data on ARM Fix section pattern code to exclude .rel.data.* sections from being merged into .data. Otherwise relocations in those sections are lost in final binary Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D9108 r311891: [efi] Build EFI bits with -fPIC on ARM clang 3.9.0 without -fPIC generates absolute jump table for switch/case statement which trips boot1.efi and loader.efi on ARM platform. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D9108 Modified: stable/11/sys/boot/efi/Makefile.inc stable/11/sys/boot/efi/loader/arch/arm/ldscript.arm stable/11/sys/boot/efi/loader/arch/arm/start.S Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/boot/efi/Makefile.inc ============================================================================== --- stable/11/sys/boot/efi/Makefile.inc Tue Jan 17 18:32:47 2017 (r312348) +++ stable/11/sys/boot/efi/Makefile.inc Tue Jan 17 19:19:29 2017 (r312349) @@ -22,4 +22,8 @@ CFLAGS+= -mno-aes CFLAGS+= -fshort-wchar .endif +.if ${MACHINE_CPUARCH} == "arm" +CFLAGS+= -fPIC +.endif + .include "../Makefile.inc" Modified: stable/11/sys/boot/efi/loader/arch/arm/ldscript.arm ============================================================================== --- stable/11/sys/boot/efi/loader/arch/arm/ldscript.arm Tue Jan 17 18:32:47 2017 (r312348) +++ stable/11/sys/boot/efi/loader/arch/arm/ldscript.arm Tue Jan 17 19:19:29 2017 (r312349) @@ -18,7 +18,7 @@ SECTIONS . = ALIGN(16); .data : { - *(.data *.data.*) + *(.data .data.*) *(.gnu.linkonce.d*) *(.rodata) *(.rodata.*) Modified: stable/11/sys/boot/efi/loader/arch/arm/start.S ============================================================================== --- stable/11/sys/boot/efi/loader/arch/arm/start.S Tue Jan 17 18:32:47 2017 (r312348) +++ stable/11/sys/boot/efi/loader/arch/arm/start.S Tue Jan 17 19:19:29 2017 (r312349) @@ -161,7 +161,7 @@ _start: mov r2, #0 1: cmp r0, r1 - bgt 2f + bge 2f str r2, [r0], #4 b 1b 2: