[U-Boot] ARM relocation, question to Heiko

Wolfgang Denk
2010-10-03T18:14:38Z

Dear "J. William Campbell",

In message <4CA75BFB.5030208@comcast.net> you wrote:
>
> >>> And I think there are more places of this type in u-boot...
> >> Yes, maybe. But relocation as I did for arm, also works
> >> on m68k, sparc, mips, avr32 and they must do also this
> >> fixups, so for common functions (except the new env handling,
> >> which I think got never tested on this architectures?) should
> >> work ...
> > This pointer problem is solved with the fixup relocs on ppc and
> > should work without manual relocation. I think this is a ppc
> > only extension but I might be wrong.
>
> You are correct that this is a ppc only extension. As such, it is
> not a good candidate for "general" use.

On contrary.

If it works for PPC, then there should be ways to do the same on other
architectures.

> Using the full relocation scheme eliminates the need for all these
> "fixups" in u-boot C code. I think this is a very desirable result.
> It is also not clear to me that hard coding in the relocation as several
> C routines will produce a u-boot that is "smaller" than the one
> produced by using normal ELF relocation. However, using full relocation
> creates an environment that is true "C" and does not rely on people
> remembering that they may have to fix up some parts of their code. It is
> hard to see much downside in using the full relocation capability
> provided by Graeme's code.

Agreed. But if we take this path, we need to find an implementation
that looks clean and readable.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Overflow on /dev/null, please empty the bit bucket.