
On Thu, 2014-01-16 at 21:27 +0100, Albert ARIBAUD wrote:
GOT relocation does not relocate references within data, contrary to ELF.
Maybe it's just my faulty implementation of relocation but it might be that nobody ever noticed this because I think only initcalls are affected.
Well, initcalls are quite essential, I guess.
Agree, but IMHO it may not hurt if they are executed from initial location until this initial memory was overwritten which I don't expect to happen till the end of init sequence.
So the only way to learn that init calls were executed from wrong location was examination of boot log in DEBUG mode.
When you say "my faulty implementation of relocation"... do you mean some implementation different from what is currently in mainline?
Well as I'm preparing for submission port for new (for mainline U-Boot) architecture and relocation code as I see is implemented in arch-specific assembly code so my implementation of relocation code is indeed differs from currently available ones in U-Boot.
But I copied my implementation from PIC-based relocation of NDS32 so in general I now think it has to work (as good as PIC-relocation culd work in current U-Boot).
-Alexey