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

Kim Phillips kim.phillips at freescale.com
Tue Oct 12 21:54:10 CEST 2010


On Tue, 12 Oct 2010 21:17:38 +0200
Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:

> > 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.
> 
> Could not wait, does this work for you?
> 
> diff --git a/nand_spl/board/freescale/mpc8313erdb/u-boot.lds 
> b/nand_spl/board/freescale/mpc8313erdb/u-boot.lds
> index ad82589..1a3e44f 100644
> --- a/nand_spl/board/freescale/mpc8313erdb/u-boot.lds
> +++ b/nand_spl/board/freescale/mpc8313erdb/u-boot.lds
> @@ -38,6 +38,8 @@ SECTIONS
>         .data : {
>                 *(.data*)
>                 *(.sdata*)
> +               _GOT_TABLE_ = .;
> +               *(.got)
>                 _GOT2_TABLE_ = .;
>                 *(.got2)
>                 __got2_entries = (. - _GOT2_TABLE_) >> 2;

it passes a build test on the 8313, but applying the same change to the
8315 still fails to build with bootstrap too big errors, because it
still suffers from the extra bits.  At least now it's buildable, so
we have some size info for the curious:

before (fits):

$ size ./nand_spl/board/freescale/mpc8315erdb/start.o
   text	   data	    bss	    dec	    hex	filename
   1528	     12	      0	   1540	    604	./nand_spl/board/freescale/mpc8315erdb/start.o

after (too big):

$ size ./nand_spl/board/freescale/mpc8315erdb/start.o
   text	   data	    bss	    dec	    hex	filename
   1588	     20	      0	   1608	    648	./nand_spl/board/freescale/mpc8315erdb/start.o

and there are other 83xx nand boards; please at least MAKEALL 83xx
before resubmitting.

Thanks,

Kim



More information about the U-Boot mailing list