[U-Boot] FPGA relocation/C environment

Joakim Tjernlund
2009-10-29T13:08:05Z

>
> Dear Wolfgang Wegner,
>
> In message <20091029082113.GE3216@leila.ping.de> you wrote:
> >
> > Now I recognized that commit 6385b28116f775da4771b768ba9bf93c3aaaf26e
> > removed FPGA relocation, which of course breaks FPGA code for my
> > Coldfire board.
>
> This is an out-of-tree port, right? If your code had been in mainline,
> this would not have happened.
>
> > What is the "proper relocation for PPC boards" that is mentioned
> > by Peter in his commit log? I found this test patch by him:
> ...
> > - I do not understand how the compiler could know about the
> > relocation for the FPGA (and possibly other) functions when the
> > actual relocation is done during U-Boot run time?
>
> The compiler / linker create a Global Offset Table (GOT) which
> basicly is a list of offsets to the image, where address constants

Just to avoid any misunderstandings, the GOT does not hold offsets, it holds
absolute addresses. These addresses gets adjusted with an offset when you
relocate.