[U-Boot] [PATCH] armv7: fix linker file for newer ld support

Alexander Holler holler at ahsoftware.de
Wed Nov 3 13:26:58 CET 2010


Hello,

Am 02.11.2010 18:38, schrieb Albert ARIBAUD:
>> The problem is that the first patch posted here places .rel.dyn after
>> ..bss, so when dumping u-boot.img, all of .bss is included in the file.
>> Keeping it before .bss allows the flat binary to omit .bss as usual.
>
> Indeed, but that accounts only for about 60k, as I said. Steve talks
> about a 200k delta; I can't find how this much can be added just by
> moving the .rel.dyn section around.
>
> The idea of having .text, .*data and .bss contiguous is that it will
> reduce RAM footprint. In order to keep this and not increase FLASH/NAND
> footprint, I think we can overlap .bss and .rel.dyn.
>
>> Using the patch quoted above, I get a working u-boot from all
>> combinations of gcc and binutils I cared to try, including gcc
>> 4.5-linaro with binutils 2.20.1.
>
> Thanks for the feedback.

Sorry, I never had an interest in the size of u-boot, therefore I 
haven't had a look at the size.

I've taken the time to compile u-boot with those gcc's I'm using here 
and with the patch which adds rel.* after and before bss:

                 after bss       before
arm926ejs 4.3.4 661K            381K
arm926ejs 4.5.1 641K            360K
armv7 4.3.5     461K            262K
armv7 4.5.1     443K            244K (both don't work)

I've used always binutils 2.20.1.

The difference in sizes between arm926ejs (kirkwood ) and armv7 (omap3) 
are because of different options.

For the arm926ejs I'm using a non standard configuration, but for the 
armv7 I've used the standard config for the Beagleboard (make 
omap3_beagle_config) with the relocation-patch on top of commit 
0c0892be0d93a5a892b93739c5eb3bf692fed4ff, so this one can be checked by 
others against other toolchains too.

Regards,

Alexander

PS: The problem with omap-u-boot and gcc 4.5.1 I'm having here is 
unrelated to relocation, I have this problem since I've installed gcc 
4.5.1, means with older versions of u-boot too (without the new relocation).


More information about the U-Boot mailing list