From patchwork Wed Nov 3 20:38:25 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Tyser X-Patchwork-Id: 71988 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id 3C6221522C0 for ; Wed, 3 Nov 2010 21:41:08 +0100 (CET) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id 0B6133335217 for ; Wed, 3 Nov 2010 21:41:08 +0100 (CET) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.17) for (single-drop); Wed, 03 Nov 2010 21:41:08 +0100 (CET) Received: from murder ([192.168.8.180]) by backend2 (Cyrus v2.2.12) with LMTPA; Wed, 03 Nov 2010 21:39:35 +0100 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend1.mail.m-online.net (Cyrus v2.2.12) with LMTPA; Wed, 03 Nov 2010 21:39:35 +0100 Received: from scanner-1.m-online.net (scanner-1.mail.m-online.net [192.168.8.165]) by mail.m-online.net (Postfix) with ESMTP id 0DEFE1C00100; Wed, 3 Nov 2010 21:39:35 +0100 (CET) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-2.m-online.net (Postfix) with ESMTP id 4008946C0C9; Wed, 3 Nov 2010 21:39:32 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 765902816A; Wed, 3 Nov 2010 21:39:23 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Gld7L8bSqcuR; Wed, 3 Nov 2010 21:39:23 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7134828175; Wed, 3 Nov 2010 21:39:19 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1B4B928167 for ; Wed, 3 Nov 2010 21:39:15 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Bc37hIyMNGwJ for ; Wed, 3 Nov 2010 21:39:13 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from xes-mad.com (xes-mad.com [216.165.139.218]) by theia.denx.de (Postfix) with ESMTPS id 1138328161 for ; Wed, 3 Nov 2010 21:39:11 +0100 (CET) Received: from [10.52.0.62] (petert.xes-mad.com [10.52.0.62]) by xes-mad.com (8.13.8/8.13.8) with ESMTP id oA3KcPGO025202; Wed, 3 Nov 2010 15:38:25 -0500 From: Peter Tyser To: Haiying Wang In-Reply-To: <1288811250.1820.96.camel@haiying-laptop> References: <1288811250.1820.96.camel@haiying-laptop> Date: Wed, 03 Nov 2010 15:38:25 -0500 Message-ID: <1288816705.8967.1571.camel@petert> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 X-Virus-Status: Clean Cc: u-boot@lists.denx.de Subject: Re: [U-Boot] patch for gc-sections X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net On Wed, 2010-11-03 at 15:07 -0400, Haiying Wang wrote: > Peter, > > Do you have any idea on why your commit: > " > commit fbe53f59bd40b3b1ab66dc98859e26589d64d1b7 > Author: Peter Tyser > Date: Wed Sep 29 14:05:56 2010 -0500 > > 85xx: Use gc-sections to reduce image size I'd guess none of the functions in the SPL binary are referenced in the linker script or linker command line, so the linker thinks none of them are necessary and removes them. Can you try the following patch: I did a quick compile test, and it seemed to work, as well as stripped out a few unused functions. Best, Peter diff --git a/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds b/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds index 7d9cee9..53d33ee 100644 --- a/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds +++ b/arch/powerpc/cpu/mpc85xx/u-boot-nand_spl.lds @@ -54,7 +54,7 @@ SECTIONS __init_end = .; .resetvec ADDR(.text) + 0xffc : { - *(.resetvec) + KEEP(*(.resetvec)) } = 0xffff __bss_start = .;