[U-Boot] ARM relocation, question to Heiko
Wolfgang Denk
wd at denx.de
Mon Oct 4 08:08:13 CEST 2010
Dear Peter Tyser,
In message <1286167382.22760.19.camel at ptyser-laptop> you wrote:
>
> > Peter, could you please fill in the details of that old story?
>
> I haven't been following the ARM relocation thread very closely, but a
> summary of the PPC relocation is:
> - Prior to commit 858290178f222d998b6425d85cf06822467918f3 PPC supported
> basic relocation, but didn't relocate static pointers, eg pointers in a
> structure, such as the strings in the cmd_pca953x[] table. So we had to
> use the hokey "struct->field += gd->reloc_off" fixups that we still have
> for some arches.
>
> - Adding "-mrelocatable" to the gcc's flags would add additional
> relocation info into the ".fixup" section that allowed us to properly
> fixup static pointers and get rid of the "+= gd->reloc_off" fixups. The
> additional fixup code was relatively small, in the 1-2% ballpark I
> think.
>
> - Unfortunately "-mrelocatable" is PPC specific. I remember dabbling
> with other, more general relocation flags like -fPIC, pie, etc, but went
> with -mrelocatable mainly because it was a smaller, easier change. We
> could share the already-used relocation fixup code in many PPC arch's
> start.S, so it wasn't too hard to get working unlike the other
> relocation schemes.
>
> - Graeme Russ was working on relocation for x86 near the same time. He
> started this thread which may provide useful info:
> http://www.mail-archive.com/u-boot@lists.denx.de/msg23347.html He
> discusses the impact of other compile flags, most of which were generic
> so could apply to this ARM discussion hopefully.
Thanks alot for the summary.
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
Q: How do you spell "onomatopoeia"?
A: The way it sounds.
More information about the U-Boot
mailing list