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

Joakim Tjernlund joakim.tjernlund at transmode.se
Tue Oct 12 19:41:56 CEST 2010


Kim Phillips <kim.phillips at freescale.com> wrote on 2010/10/12 19:31:25:
> 
> On Tue, 12 Oct 2010 16:10:33 +0200
> Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:
> 
> > Wolfgang Denk <wd at denx.de> wrote on 2010/10/12 15:47:19:
> > > 
> > > Dear Joakim Tjernlund,
> > > 
> > > In message <OF4DCFBD28.58E81A84-ONC12577BA.0047150B-C12577BA.
> > > 0047D319 at transmode.se> you wrote:
> > > >
> > > > > What happens when one uses this patch in combination with a 
> > "standard"
> > > > > (i. e. older, unpatched) GCC?
> > > > 
> > > > Nothing, gcc will produce -fPIC relocs and the code will/should 
just 
> > work.
> > > 
> > > OK, so your change means effectively a no-op (except for the 
moderate
> > > size increase in start.S) to most of us?
> > 
> > Yes.
> 
> 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

 
> 
> ...
> 
> Configuring for MPC8315ERDB_NAND board...
> powerpc-linux-gnu-ld: NAND bootstrap too big
> powerpc-linux-gnu-ld: NAND bootstrap too big
> start.o:(.got2+0x4): undefined reference to `_GOT_TABLE_'
> make[1]: *** [/home/r1aaha/git/u-boot/nand_spl/u-boot-spl] Error 1

How much is missing?

One thing I wonder about: How come NAND_SPL need GOT2 relocs
but no FIXUPs? I figured either none or both.

    Jocke
> 
> (I'm using powerpc-linux-gnu-gcc (Sourcery G++ Lite 4.3-74) 4.3.2 atm).
> 
> Kim
> 



More information about the U-Boot mailing list