From owner-svn-src-head@freebsd.org Tue Nov 28 16:23:51 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 4A5C0DBB7DD; Tue, 28 Nov 2017 16:23:51 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 109F36C0AF; Tue, 28 Nov 2017 16:23:51 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-io0-x243.google.com with SMTP id d16so421389iob.4; Tue, 28 Nov 2017 08:23:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=BB2R9sHa+pgu+916ErgAJO7amn+snMBztQSoYdpELaY=; b=VHCdJk/8ghWgJCxTG+J7HIA+WridqguC6owGbTwPdSD1ipVAahcbCJSDIWNXi4donK qzdwfiMTrR+V+120SBptr8a3T59J5Si2OGq6T5ksk1wSOaVaNcmiTrXNvfbq06wG9xIj V+ltJYDVw/4VDTdm6VKUlLui+vWQWMrlzz2mla0mrPD8abmxl7z5CBfJUzhHDDHk5qv4 eT6WRH2DbHOeUXesagsmSnWXFDyfx429tBdNDxSP99xmq5V1ZrRPi1j8nr5F4nypXClS xV9AaUv8FYnUNqN7xN1ebvQ7vRx7ifG7o7gVvrEdaqow33HaI3DoWLfxnnuDAffocduu lo7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=BB2R9sHa+pgu+916ErgAJO7amn+snMBztQSoYdpELaY=; b=BUV8EV1mC/WsJun11IpJeoCUz4cMdAhf9VffZtJLsm4+439QyeGKlTmsU06Z4WvvNV 2JqIFXelT6DwbKsBelnT6SmgNhhl8gu3tSBlftdrQRGhGzbcK0DGn+DScoNe04fBdEO6 CrfEoqmJBhoTs4s0kcQfillBwSwpU9sccpn5JNDdoPrcHWHnZjslh5bGALeSDT5+YwfA lntzL6KVt0NDT7VU9y/p3wNtmncZlgDHovsGm2DrNsH1H81QZXYr0e0KT+TTYvBKJN6+ lXeq4ZZ8sNUTFvJuJutpgXPHRqRMU5mRG+zw0YkO0pgeP7liZ99ueKtzLoVJgF7YgM2I BKqw== X-Gm-Message-State: AJaThX6ApzD2cEu8uV6GyOZAFjcD1wqSpTqoCGrYmNIbdksfb/7PlDu1 IJrDuFgqypQrRMdLPXwZp4ZySnu6unuKYCzvS2w= X-Google-Smtp-Source: AGs4zMYvX4JPZhZruyAwWdsd7lB9n3kDlAtdx6FU2mXPN0Xe2D4UbZrA+P60mxAxdwys6Hf/0XtSgE4YIFAhhr61VQU= X-Received: by 10.107.132.85 with SMTP id g82mr25724811iod.232.1511886230017; Tue, 28 Nov 2017 08:23:50 -0800 (PST) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.79.78.207 with HTTP; Tue, 28 Nov 2017 08:23:49 -0800 (PST) In-Reply-To: <5831ba86-742d-7019-e1c9-4b6563d2cdcc@freebsd.org> References: <201711252145.vAPLjpV6051703@repo.freebsd.org> <5831ba86-742d-7019-e1c9-4b6563d2cdcc@freebsd.org> From: Justin Hibbits Date: Tue, 28 Nov 2017 10:23:49 -0600 X-Google-Sender-Auth: dVYMRlBs1yIhfFLwo-uJtMJ5ywE Message-ID: Subject: Re: svn commit: r326203 - head/sys/conf To: Nathan Whitehorn Cc: src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset="UTF-8" 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:23:51 -0000 On Tue, Nov 28, 2017 at 10:13 AM, Nathan Whitehorn wrote: > > > 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 > 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