Hi Alexey, On Thu, 16 Jan 2014 17:48:45 +0000, Alexey Brodkin <[email protected]> wrote:
> On Wed, 2014-01-15 at 22:43 +0100, Albert ARIBAUD wrote: > > Hi Alexey, > > > > On Wed, 15 Jan 2014 15:19:56 +0400, Alexey Brodkin > > <[email protected]> wrote: > > > > > "init_sequence_r" is just an array that consists of compile-time > > > adresses of init functions. Since this is basically an array of integers > > > (pointers to "void" to be more precise) it won't be modified during > > > relocation - it will be just copied to new location as it is. > > > > IIRC, in ARM we switched from GOT to ELF relocation precisely so that > > data would be relocated as well as code, and I think it actually is, > > otherwise we'd have a lot of complains. Therefore I fail to understand > > the statements above. Can someone tell me what I'm getting wrong? > > Unfortunately I don't have any supported in U-Boot ARM board handy and > run U-boot on another architecture at all (Synopsys DesignWare ARC) so > I'm not sure if on ARM functions from "init_sequence_r" list are > executed from "RAM" (i.e. from location where they were relocated). Yes, they are. > I use GOT relocation and see following outputs. 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. When you say "my faulty implementation of relocation"... do you mean some implementation different from what is currently in mainline? > -Alexey Amicalement, -- Albert. _______________________________________________ U-Boot mailing list [email protected] http://lists.denx.de/mailman/listinfo/u-boot

