[U-Boot] ARM relocation, question to Heiko

Graeme Russ
2010-10-04T17:04:31Z

On Monday, October 4, 2010, Wolfgang Denk <wd@denx.de> wrote:
> Dear Albert ARIBAUD,
>
> In message <4CA999EE.5030309@free.fr> you wrote:
>>
>> Note however that linking for base address 0 is not mandatory for
>> achieving true position independence. What is required is that the code
>> which runs from power-up until relocation be able to run anywhere, i.e.,
>> this code should not require any relocation fixup. That can be achieved
>> on ARM by using only relative branches and accessing data only relative
>> to pc (e.g. literals) or truly absolute (e.g. HW registers etc).
>
> That means you need to build all of U-Boot that way, because
> significant parts of the code already run before relocation
> (including all clocks and timers setup, console setup, printf and all
> routines these pull in).
>

Have a look at x86 - Relocation is performed at the first possible moment

This made full relocation for x86 was relatively trivial :)

Regards,

Graeme