public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Peter Tyser <ptyser@xes-inc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] patch for gc-sections
Date: Wed, 03 Nov 2010 15:38:25 -0500	[thread overview]
Message-ID: <1288816705.8967.1571.camel@petert> (raw)
In-Reply-To: <1288811250.1820.96.camel@haiying-laptop>

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 <ptyser@xes-inc.com>
> 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:
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 = .;

I did a quick compile test, and it seemed to work, as well as stripped
out a few unused functions.

Best,
Peter

  reply	other threads:[~2010-11-03 20:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03 19:07 [U-Boot] patch for gc-sections Haiying Wang
2010-11-03 20:38 ` Peter Tyser [this message]
2010-11-04 14:19   ` Haiying Wang
2010-11-04 15:45     ` Peter Tyser
2010-11-04 16:16       ` Haiying Wang
2010-11-04 16:36         ` Peter Tyser
2010-11-04 18:22           ` Haiying Wang
2010-11-10 19:25             ` Haiying Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288816705.8967.1571.camel@petert \
    --to=ptyser@xes-inc.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox