Date: Tue, 28 Nov 2017 10:34:31 -0600 From: Justin Hibbits <jrh29@alumni.cwru.edu> To: Nathan Whitehorn <nwhitehorn@freebsd.org> Cc: src-committers <src-committers@freebsd.org>, "svn-src-all@freebsd.org" <svn-src-all@freebsd.org>, "svn-src-head@freebsd.org" <svn-src-head@freebsd.org> Subject: Re: svn commit: r326203 - head/sys/conf Message-ID: <CAHSQbTC_AB7=D9mrDEiindn_YPdTONwwsOYQ4TO40uGopMZKbQ@mail.gmail.com> In-Reply-To: <c628778b-eae9-352a-190e-5e346f35bc55@freebsd.org> References: <201711252145.vAPLjpV6051703@repo.freebsd.org> <CAHSQbTA7c9VpZpYcB1%2BuW62yW%2BFoscnV8K9AL9txMKO43wcQpg@mail.gmail.com> <5831ba86-742d-7019-e1c9-4b6563d2cdcc@freebsd.org> <CAHSQbTBqzUqdWNNhL_DMynWN9ZdY1YtUcyKz0m6uPWDUV0MXtA@mail.gmail.com> <c628778b-eae9-352a-190e-5e346f35bc55@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Nov 28, 2017 at 10:30 AM, Nathan Whitehorn <nwhitehorn@freebsd.org> wrote: > > > On 11/28/17 08:23, Justin Hibbits wrote: >> >> On Tue, Nov 28, 2017 at 10:13 AM, Nathan Whitehorn >> <nwhitehorn@freebsd.org> wrote: >>> >>> >>> On 11/28/17 07:27, Justin Hibbits wrote: >>>> >>>> On Sat, Nov 25, 2017 at 3:45 PM, Nathan Whitehorn >>>> <nwhitehorn@freebsd.org> 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 >>> >> This is using base binutils (2.17.50...) I don't know why it's doing >> this, but readelf shows that file offset 0x0000000000100000 maps to >> 0xc000000000000000, and it goes from there. >> >> - Justin >> > > Bizarre. Why don't you just revert for now (I need to run) and I can figure > out what went wrong later? > -Nathan I reverted privately already. I doubt there are many/any other users of Book-E powerpc64, so I can wait it out for now. - Justin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAHSQbTC_AB7=D9mrDEiindn_YPdTONwwsOYQ4TO40uGopMZKbQ>