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

Joakim Tjernlund joakim.tjernlund at transmode.se
Tue Oct 12 21:09:49 CEST 2010


Scott Wood <scottwood at freescale.com> wrote on 2010/10/12 20:25:40:
> 
> 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.

The PIC type can be different for various files but u-boot
doesn't do that and I don't see why it should so we should
be fine.

> 
> 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.

Yes, it is a simple symbol to add. I will do it twm if you don't
beat me to it. it would be nice if you could try what works
and not though.

 Jocke


More information about the U-Boot mailing list