[U-Boot] [PATCH] mpc83xx: Add -fpic relocation support

Kim Phillips kim.phillips at freescale.com
Tue Oct 12 20:38:38 CEST 2010


On Tue, 12 Oct 2010 13:25:40 -0500
Scott Wood <scottwood at freescale.com> wrote:

> On Tue, 12 Oct 2010 13:19:38 -0500
> Kim Phillips <kim.phillips at freescale.com> wrote:
> 
> > On Tue, 12 Oct 2010 19:41:56 +0200
> > Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:
> > 
> > > Kim Phillips <kim.phillips at freescale.com> wrote on 2010/10/12 19:31:25:
> > > > that moderate size increase in start.S breaks nand builds:
> > > > 
> > > > Configuring for MPC8313ERDB_NAND_66 board...
> > > > start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_'
> > > > make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1
> > > 
> > > ehh, these got there own linker scripts it seems
> > > I could #ifdef NAND_SPL I guess?
> > > Or possbly select one of GUT/GOT2 based on
> > > #if __pic__ == 1
> > 
> > I think NAND_SPL would be clearer, assuming no other differences are
> > involved.
> 
> Why?  The type of PIC is the distinction.  If it can be determined with
> __pic__, wouldn't that also avoid the extra code being present in the
> main U-Boot if an older toolchain is used and we end up with -fPIC?
> And there could be other types of SPL besides NAND.

that's true - I was going for more reader consistency wrt the current
code.

> The linker scripts for NAND SPL would still have to be updated, though,
> or else wouldn't it break with a new toolchain that actually uses
> -fpic?  I assume we're not passing different flags when building the
> SPL.

we're not.

Kim



More information about the U-Boot mailing list