From patchwork Thu Jul 9 16:39:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dale Farnsworth X-Patchwork-Id: 29632 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 64C7BB6F1F for ; Fri, 10 Jul 2009 03:02:57 +1000 (EST) Received: by ozlabs.org (Postfix) id 590BCDDE07; Fri, 10 Jul 2009 03:02:57 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (bilbo.ozlabs.org [203.10.76.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bilbo.ozlabs.org", Issuer "CAcert Class 3 Root" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 56B97DDE06 for ; Fri, 10 Jul 2009 03:02:57 +1000 (EST) Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by bilbo.ozlabs.org (Postfix) with ESMTP id 47D43B72F8 for ; Fri, 10 Jul 2009 03:02:32 +1000 (EST) Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 41A7BB707B for ; Fri, 10 Jul 2009 03:02:25 +1000 (EST) Received: by ozlabs.org (Postfix) id 313ACDDE06; Fri, 10 Jul 2009 03:02:25 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org X-Greylist: delayed 1389 seconds by postgrey-1.31 at ozlabs; Fri, 10 Jul 2009 03:02:24 EST Received: from xyzzy.farnsworth.org (xyzzy.farnsworth.org [65.39.95.219]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C2C03DDE04 for ; Fri, 10 Jul 2009 03:02:24 +1000 (EST) Received: from dale by xyzzy.farnsworth.org with local (Exim 4.69) (envelope-from ) id 1MOweD-0001rE-49; Thu, 09 Jul 2009 09:39:06 -0700 Date: Thu, 9 Jul 2009 09:39:01 -0700 From: Dale Farnsworth To: Kumar Gala Message-ID: <20090709163900.GA6549@farnsworth.org> References: <09159ADA-39F9-419E-AE46-4CFAE612AFB9@kernel.crashing.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <09159ADA-39F9-419E-AE46-4CFAE612AFB9@kernel.crashing.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on xyzzy.farnsworth.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 Subject: Re: binutils 2.19 issue with kernel link Cc: linuxppc-dev@ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org On Wed, Jul 08, 2009 at 05:41:39PM -0500, Kumar Gala wrote: > We are seeing an issue w/ld and kernel linking of 32-bit kernels. > > The ld from fedora 11 (2.19.51.0.2-17.fc11 20090204) ends not providing > the proper address for _end. > > Building stock v2.6.30 w/the mpc85xx_defconfig we get: > > 00001000 A _end > > Using 2.18.50.20080215 we get: > > c0680000 A _end > > If we modify the linker script: > > _end2 = .; > _end3 = ALIGN(4096); > _end4 = ALIGN(PAGE_SIZE); > . = ALIGN(PAGE_SIZE); > _end = . ; > PROVIDE32 (end = .); > > and the result is: > > 00001000 A _end > c067f678 A _end2 > c0680000 A _end3 > c0680000 A _end4 > > I used an old version of linker (2.18.50.20080215) and re-linked: > > c067f678 A _end2 > c0680000 A _end > c0680000 A _end3 > c0680000 A _end4 > > Any ideas? We have found the following workaround to be useful. Thanks to Andrew Jenner at Code Sourcery. -Dale Dale Farnsworth MontaVista Software diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index acf237f..34b0181 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S @@ -282,4 +282,7 @@ SECTIONS . = ALIGN(PAGE_SIZE); _end = . ; PROVIDE32 (end = .); + +#undef PPC + .PPC.EMB.apuinfo 0 : { *(.PPC.EMB.apuinfo) } }