[U-Boot] [PATCH] futile c relocation attempt
Graeme Russ
graeme.russ at gmail.com
Wed Oct 6 12:20:54 CEST 2010
On Wednesday, October 6, 2010, Reinhard Meyer <u-boot at emk-elektronik.de> wrote:
> Dear Graeme Russ,
>> I had a quick look at this and nothing is jumping out at me. Of course I am
>> not familiar with ARM asm...
>>
>> I don't see any reason why this ultimately will not work eventually. You
>> may be having some issues with the transition from asm->C->asm through the
>> relocation - This was an especially painful thing for me involving an
>> intermediate trampoline which I have only recently figured out how to remove.
>
> I think the relocation itself works fine, when looking at the debug output.
>
Time to disassemble using objdump
>> Maybe some memory barriers are needed to stop the C optimiser mangling things?
>
> It can't really optimize across the call to the (now wrongly named) reloc_code in
> assembly.
True, objdump will clarify
>
>> Interestingly, ARM is adding gd->reloc_off while x86 is subtracting
>> gd->reloc_off. If this is correct, I need to change the calculation of
>> gd_reloc_off to be consistent
>
> It should always ADD it, when it is calculated as "Final Location" - "Current Location".
I have my calculation the wrong way around
> Note, of course, that the value itself might well be negative.
>
> If, for example, the NOR Flash is at a higher address than RAM...
>
Which it is for x86
Regards
Graeme
More information about the U-Boot
mailing list