From owner-svn-src-head@freebsd.org Tue Nov 28 16:14:07 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 BEF98DBB361; Tue, 28 Nov 2017 16:14:07 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9B016B6AB; Tue, 28 Nov 2017 16:14:07 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from comporellon.tachypleus.net (cpe-75-82-218-62.socal.res.rr.com [75.82.218.62]) (authenticated bits=0) by c.mail.sonic.net (8.15.1/8.15.1) with ESMTPSA id vASGDrA3032035 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Tue, 28 Nov 2017 08:13:54 -0800 Subject: Re: svn commit: r326203 - head/sys/conf To: Justin Hibbits Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201711252145.vAPLjpV6051703@repo.freebsd.org> From: Nathan Whitehorn Message-ID: <5831ba86-742d-7019-e1c9-4b6563d2cdcc@freebsd.org> Date: Tue, 28 Nov 2017 08:13:53 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Sonic-CAuth: UmFuZG9tSVY4qqSmZ2CPCOsAxma2I0lZzyi+RErQiVfxI6U3T2DXdj6FecRDn2XGmaJl4zBG0VhHFG/Mo6AhkboMduh2GQh1WJRU7MKAg2A= X-Sonic-ID: C;uODvIFfU5xGXiusnWtmBlw== M;IK82IVfU5xGXiusnWtmBlw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 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: Tue, 28 Nov 2017 16:14:07 -0000 On 11/28/17 07:27, Justin Hibbits wrote: > On Sat, Nov 25, 2017 at 3:45 PM, Nathan Whitehorn > wrote: >> Author: nwhitehorn >> Date: Sat Nov 25 21:45:51 2017 >> New Revision: 326203 >> URL: https://svnweb.freebsd.org/changeset/base/326203 >> >> Log: >> Avoid emitting a PT_INTERP section for powerpc64 kernels and arrange for >> the first instruction to be at the start of the text segment. This allows >> the kernel to be booted correctly by stock kexec-lite. >> >> MFC after: 2 weeks >> >> Modified: >> head/sys/conf/ldscript.powerpc64 >> >> Modified: head/sys/conf/ldscript.powerpc64 >> ============================================================================== >> --- head/sys/conf/ldscript.powerpc64 Sat Nov 25 21:44:23 2017 (r326202) >> +++ head/sys/conf/ldscript.powerpc64 Sat Nov 25 21:45:51 2017 (r326203) >> @@ -10,7 +10,7 @@ SECTIONS >> { >> /* Read-only sections, merged into text segment: */ >> >> - . = kernbase + SIZEOF_HEADERS; >> + . = kernbase; >> PROVIDE (begin = . - SIZEOF_HEADERS); >> >> .text : >> @@ -24,7 +24,10 @@ SECTIONS >> _etext = .; >> PROVIDE (etext = .); >> >> - .interp : { *(.interp) } >> + /* Do not emit PT_INTERP section, which confuses some loaders (kexec-lite) */ >> + .interpX : { *(.interp) } : NONE >> + /DISCARD/ : { *(.interp) } >> + >> .hash : { *(.hash) } >> .dynsym : { *(.dynsym) } >> .dynstr : { *(.dynstr) } >> > This broke powerpc64 Book-E kernels. It now puts a 1MB blank space > ahead of the kernel data (ELF header + 1MB - sizeof(header) of 0's), > meaning that now the kernel needs to be loaded by uboot 1MB earlier in > memory, rather than straight on the 64MB boundary as it has been. > > - Justin > How on Earth? It doesn't do that on my system. What binutils are you using? -Nathan