[U-Boot] [PATCH 3/4] mpc83xx: Add true PIC support.

Joakim Tjernlund joakim.tjernlund at transmode.se
Sun Jan 9 22:01:57 CET 2011


Wolfgang Denk <wd at denx.de> wrote on 2011/01/09 21:54:34:
>
> Dear Joakim Tjernlund,
>
> In message <1292838435-14958-3-git-send-email-Joakim.Tjernlund at transmode.se> you wrote:
> > By copying the GOT to the end of the INIT_RAM(dcache)
> > and relocating it there, it is much esier to
> > support true PIC on u-boot. This cannot handle
> > FIXUP so C code that depends on fixups before relocation to RAM
> > must use LINK_OFF to calculate the difference.
> ...
> > +   /*
> > +    * Copy GOT to cache and relocate it
> > +    * This assumes there is enough space at the end
> > +    * INIT_RAM to hold a copy of the GOT.
> > +    */
>
> Is it correct to assume that system will crash horribly if for some
> reason the GOT should not fit?

Yes ATM. I considered adding tests but it will cost more space and I
am not sure how to report the error this early.

>
> And this means that there is no way to adapt this approach to systems
> where initial RAM is restrictd and not big enough to hold a copy of
> the GOT?

Can't think of one, you need somewhere to put the GOT. You can work on
reducing the GOT size though.

      Jocke



More information about the U-Boot mailing list