[U-Boot] ARM relocation, question to Heiko
Albert ARIBAUD
albert.aribaud at free.fr
Mon Oct 4 10:33:05 CEST 2010
Le 04/10/2010 10:28, Joakim Tjernlund a écrit :
>>
>> Le 04/10/2010 09:36, Joakim Tjernlund a écrit :
>>
>>> However, I think we will loose the possibility to add "link once, burn and
>> run anywhere"
>>> feature I impl. once(but it was at the time deemed to intrusive) if
>>> we skip -fPIC and go for the linker -pie relocation.
>>
>> On ARM at least, I don't think so. From what I see, the -pie ld option
>> without the -fPIC/-fPIE compiler option alone builds a .rel.syn table
>> that contains all necessary fixes to mve the code anywhere.
>
> hmm, maybe my memory fails me but doesn't these relocs change the
> code to relocate accesses? While in flash you can't do that.
> Perhaps this is fixable too with the LINK_OFF method I impl.
> but memory fails me as it was quite some time ago.
>
> Jocke
Actually the principle is to link with TEXT_BASE equal to the NOR FLASH
location of the image [1] so that relocation is not needed there. Only
when you move the code to RAM do you need relocation.
[1] which voids my idea of setting TEXT_BASE to 0, btw, but that does
not matter much anyway.
Amicalement,
--
Albert.
More information about the U-Boot
mailing list