All of lore.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 7/7] add gc-sections to TPL boot
Date: Fri, 28 Jan 2011 12:58:39 -0600	[thread overview]
Message-ID: <20110128125839.209e4d5f@udp111988uds.am.freescale.net> (raw)
In-Reply-To: <1296240366.2918.104.camel@haiying-laptop>

On Fri, 28 Jan 2011 13:46:06 -0500
Haiying Wang <Haiying.Wang@freescale.com> wrote:

> On Fri, 2011-01-28 at 12:30 -0600, Scott Wood wrote:
> > I think --gc-sections should go in LDFLAGS_u-boot instead.
> LDFLAGS_u-boot has --gc-sections already, I did not change it.

It looks like LDFLAGS_u-boot may not be suitable for building SPL/TPL
images.  Since TPL is new, and we don't have to worry about breaking
any existing boards, just unconditionally use --gc-sections when
linking the final TPL image.  Or, if we want a way for
boards/cpus to add ld options that things like TPL use, introduce
LDFLAGS_FINAL that holds ld parameters used for final link of any
image, with LDFLAGS_u-boot holding things like text addresses and linker
scripts with values that only apply to the main image.

I'd prefer the latter approach, as we could make use of it in SPL as
well, which does have existing boards to worry about.

> > In any case, I don't think we want different behavior here based on
> > whether we have TPL.  Either LDFLAGS is used in partial linking, or
> > it's not.
> I don't understand why LDFLAGS was added here in patch
> http://lists.denx.de/pipermail/u-boot/2011-January/084705.html
> 
> It says "LDFLAGS sets necessary option by partial linking (use in
> cmd_link_o_target)." But without this changing, the partial linking
> worked well before. Please correct me if I am wrong.
> 
> So if someone can confirm LDFLAGS is not necessary to be added in
> cmd_link_o_target, I prefer not add it here.

Whether leaving out -n during partial link worked for you or not,
LDFLAGS is supposed to be used by partial links (that distinction is
why LDFLAGS_u-boot was created).  So don't put things in LDFPLAGS that
break partial links.

-Scott

  reply	other threads:[~2011-01-28 18:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-28  4:58 [U-Boot] [PATCH 3/8 v3] Introduce the Tertiary Program loader Haiying.Wang at freescale.com
2011-01-28  4:58 ` [U-Boot] [PATCH 4/8 v3] powerpc/85xx: add TPL support Haiying.Wang at freescale.com
2011-01-28  4:58 ` [U-Boot] [PATCH 5/8 v3] P1021: add P1021MDS board support Haiying.Wang at freescale.com
2011-01-28 14:49   ` Kumar Gala
2011-01-28 15:19     ` Haiying Wang
2011-01-28 19:06   ` Timur Tabi
2011-01-28 19:13     ` Scott Wood
2011-01-28 19:22     ` Haiying Wang
2011-01-28 19:24       ` Timur Tabi
2011-01-28 19:30         ` Haiying Wang
2011-01-28  4:58 ` [U-Boot] [PATCH 8/8 v3] p1021mds: add QE and UEC support Haiying.Wang at freescale.com
2011-01-28  4:58 ` [U-Boot] [PATCH 7/7] add gc-sections to TPL boot Haiying.Wang at freescale.com
2011-01-28 17:36   ` Scott Wood
2011-01-28 18:08     ` Haiying Wang
2011-01-28 18:21       ` Albert ARIBAUD
2011-01-28 18:30       ` Scott Wood
2011-01-28 18:46         ` Haiying Wang
2011-01-28 18:58           ` Scott Wood [this message]
2011-01-28 19:07           ` Haiying Wang
2011-01-28 19:12             ` Scott Wood
     [not found] ` <1296190690-21146-3-git-send-email-Haiying.Wang@freescale.c om>
2011-01-28 10:02   ` [U-Boot] [PATCH 5/8 v3] P1021: add P1021MDS board support Fabian Cenedese
2011-01-28 14:43     ` 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=20110128125839.209e4d5f@udp111988uds.am.freescale.net \
    --to=scottwood@freescale.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.