[U-Boot] [TESTING PATCH] ppc: Relocation test patch
Joakim Tjernlund
joakim.tjernlund at transmode.se
Thu Sep 17 09:06:27 CEST 2009
>
> When preparing the ppc relocation patches I noticed that the gcc
> -mrelocatable compiler flag increases the .reloc section by 3 or 4
> Kbytes. I did a compile test, and this increase pushes the ALPR board
> back over 256K (it recently had the same size issue, see "ppc4xx: Remove
> some features from ALPR to fit into 256k again"). No other boards
> appear to break size-wise.
>
> So I guess I had 2 questions:
> 1. Is enabling proper relocation worth the 3/4KB that will be added to
> every ppc binary? I personally think so as the manual relocation fixups
> that currently litter the code can be removed and true relocation is
> much less hokey in the long run. X-ES's U-Boot binaries also are
> generally much smaller than their allocated 512KB, so this increase
> doesn't affect me much:)
You can get some of this space back by just #ifdef:ing out the manual relocation
code. Removing it completely is OK by me though.
The size can be further decreased by looking over the use of global data:
- Some tables can be replaced by code.
- Combine several global variables into one struct variable.
- reducing string literals
One day we can fit the whole relocation table into built-in CPU memory, hopefully
that will make it possible to make u-boot a true PIC exe
Jocke
More information about the U-Boot
mailing list