[U-Boot] Easy reduction to u-boot image size

Mike Frysinger vapier at gentoo.org
Wed May 26 06:36:17 CEST 2010


On Tuesday 25 May 2010 20:44:26 Charles Manning wrote:
> One thing I came across was that u-boot is not using function sections etc
> and as a result there's quite a bit of dead code that is included in the
> image.

FWIW, Blackfin has been using function/data sections and gc sections for quite 
a while now without any problems.  i vaguely recall things breaking with 1.1.6 
when i first implemented it, but 1.3.x+ havent caused troubles.

> Applying the following patch reduced the size by around 7k to approx 55k.
> That really helped :-) and lets me add back some functionality and still
> keep under 60k.
> 
> Note:
> 1) This only sorts out the overo. Other u-boot.lds files need to be
> modified in the same way.
> 2) This only does dead code stripping and not dead data stripping. I have
> not yet figured out why that is not working (hence the commented out line
> for -fdata-sections). This will save something, but I expect not very
> much.

might be better to add this to one arch at a time as maintainers can verify 
it.  that way they can take advantage of things while the others catch up.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100526/6c839ad5/attachment.pgp 


More information about the U-Boot mailing list