From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Wed, 26 May 2010 00:36:17 -0400 Subject: [U-Boot] Easy reduction to u-boot image size In-Reply-To: <201005261244.27080.manningc2@actrix.gen.nz> References: <201005261244.27080.manningc2@actrix.gen.nz> Message-ID: <201005260036.18326.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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