[U-Boot-Users] Changing u-boot relocation scheme
kenneth johansson
kenneth at southpole.se
Fri Jul 25 19:28:48 CEST 2008
On Fri, 2008-07-25 at 13:02 -0400, Jerry Van Baren wrote:
> kenneth johansson wrote:
> > On Fri, 2008-07-25 at 17:23 +0200, Haavard Skinnemoen wrote:
>
> [snip]
>
> >> There will obviously be a fair amount of arch-specific code required to
> >> make the actual relocation work though.
> >
> > So the gain of using dynamic relocation is that we have fever relocation
> > types to implement and objcopy is not going to strip away the relocation
> > section as it do for non dynamic relocs.
> >
> > still the code to actually do the relocation is architecture dependent
> > and non existing. At least for powerpc we have a much easier option of
> > having gcc generate a fixup table.
>
> EVERYTHING *already* exists, we just aren't using it right. That is
> what the elf loader does in a "normal" system. Grant did it on the
> PowerPC architecture - look at the archives, he didn't write new code
> for this, it's already in there.
I know exactly what Grant did. But he is not using the elf relocation
information as that is simply not included in the data that is the
u-boot.bin file.
Also this discussion is more about doing it in a way that is not powerpc
specific and documented, we already have as you mentioned code for the
powerpc specific way but it's not using elf relocation information.
I was afraid that what was needed was more or less a complete linker but
it looks like if one generate the dynamic reloc table a much simpler
linker(relocation function) is needed. Still probably a lot more complex
than the GOT and fixup code that is just a loop over a table. We may
need a case also ;-)
More information about the U-Boot
mailing list