[U-Boot] ARM relocation, question to Heiko

Heiko Schocher hs at denx.de
Mon Oct 4 07:52:16 CEST 2010


Hello Wolfgang,

Wolfgang Denk wrote:
> Dear Reinhard Meyer,
> 
> In message <4CA79896.2010606 at emk-elektronik.de> you wrote:
>> I agree here. _If_ relocation, it should work without hand-adding
>> fixup stuff to all functions using initialized data with pointers.
>> Even Wolfgang forgot to fixup his 2nd level command table in
>> cmd_nvedit.c ;)
> 
> I didn't forget it - at least not in the sensse that I think this is
> something that needs to be done.
> 
> This works fine on PPC with relocation, and we should make it work
> the same on other arches.

If we find a way for this on ARM, Ack!

>> And, for space concerns in flash, relocation should always be an
>> option on a board by board basis...
> 
> NAK.
> 
>> And as an idea, if position independent code is used, only pointers
>> in initialized data need adjustment. Cannot the linker emit a table
>> of addresses that need fixing?
> 
> It does. That's the GOT.

So I thought too, and I made a fixup in relocate_code() for the GOT
entries. But this don;t work with for example the commandtables.

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list