[U-Boot] [PATCH] powerpc/nand spl: link libgcc

Scott Wood scottwood at freescale.com
Tue Dec 14 00:49:20 CET 2010


On Tue, 14 Dec 2010 00:16:28 +0100
Wolfgang Denk <wd at denx.de> wrote:

> Just two questions:
> 
> Q1: Are we sure that the observed behaviour is intentional, and not
>     eventually unintended behaviour (well, a bug) in the new versions
>     of GCC?  In general newer releases are supposed to provide better
>     optimization, but with GCC regressions seem to be more common?

I'm pretty sure it's intentional (though lacking an option to turn it
off seems ill-advised).  It should reduce code size normally -- it's
just that NAND SPL is too small for the savings to overcome the fixed
cost of the mechanism.  The main U-Boot images do seem to have gotten a
bit smaller with 4.5.

Going from 4.3 (doesn't do this) to 4.5 (does do this), I see SPL size
increases of between 16 and 112 bytes.  None of the boards in this
patch went over 4096 bytes.  Using -O2 instead of -Os, which disables
this "optimization", with 4.5 results in even larger SPLs (with or
without this patch).

> Q2: What happens with older compilers, that don't need this?  Is this
>     change a No-Op for these?

With compilers that don't do this, the symbol references won't be
generated, and no part of libgcc.a will be pulled in.

-Scott



More information about the U-Boot mailing list