[U-Boot-Users] Changing u-boot relocation scheme

Haavard Skinnemoen haavard.skinnemoen at atmel.com
Sat Jul 26 18:09:03 CEST 2008


On Sat, 26 Jul 2008 07:36:35 +0200
Wolfgang Denk <wd at denx.de> wrote:

> n message <20080725205017.564dedff at siona.local> you wrote:
> >
> > Ok, I'll stop the chest-beating now. But please stop trying to tell
> > people that adding a powerpc-specific option (which nobody seems to
> > know how really works) to the command line will work on any other
> > architectures than powerpc.  
> 
> OK - then please you explain exactly which other architectures have
> problems with relocation?

Well, AVR32 doesn't exactly have a _problem_ with relocation except
that it relies on a handful of manual fixups for initialized pointers.
From a quick scan, Blackfin, m68k, MIPS, PPC and SPARC also rely on
this.

While it does work, it is somewhat fragile and requires people writing
new code to know about this particular quirk if they want to use
statically initialized pointers.

Also, as was shown elsewhere in this thread, quite a few strings are
being accessed directly from flash even after relocating to RAM. This
could at least in theory interfere with the flash driver due to cache
effects.

So I'm a bit concerned that if PowerPC introduces its own method of
relocating these data pointers, the code used on other platforms would
get less exposure and therefore be more susceptible to bugs. Ideally,
all platforms should do relocation the same way, and that necessarily
means using standard methods like ELF dynamic relocations.

Haavard




More information about the U-Boot mailing list