
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:
- 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