[U-Boot] [PATCH 0/2] Make sure 85xx bss doesn't start at 0x0

Graeme Russ graeme.russ at gmail.com
Wed Oct 7 11:56:17 CEST 2009


On Wed, Oct 7, 2009 at 5:55 PM, Wolfgang Denk <wd at denx.de> wrote:
> Dear Graeme Russ,
>
> In message <d66caabb0910061824s4165d33bu5d5213f6783c09d0 at mail.gmail.com> you wrote:
>>
>> I think that even the -mrelocatable / .fixup method may not be needed at
>> all. -pie / -pic used by themselves creates enough information for an OS
>> dynamic loader to relocate an executable, so why not U-Boot? Given that
>> the type and location of each section is easily determined, a striped
>> down dynamic loader can provide a platform-independent relocation scheme.
>
> One reason for not using ELF images for the boot loader is size. The
> ELF header alone is often more than we would be willing to accept, not
> to mention the additional code.
>

But the headers get stripped from the final binary. All we are left with in
order to locate the ELF section data are the symbols exported from the
linker script

The extra code is only three very tight for-loops. I had them wrapped in
functions to improve readability, but they are good inline candidates (only
called once each) and I doubt they use much code space at all (I'll send
through actual numbers soon)

Question is, does -mrelocatable result in smaller .got (et al) are is the
.fixup section adding extra size for the sake of ease of implementation?


> Best regards,
>
> Wolfgang Denk
>

Regards,

Graeme


More information about the U-Boot mailing list