[U-Boot] [PATCH] relocation: Do not relocate NULL pointers.

Joakim Tjernlund joakim.tjernlund at transmode.se
Mon Sep 28 17:23:07 CEST 2009


Peter Tyser <ptyser at xes-inc.com> wrote on 28/09/2009 17:08:58:
> >
> > Peter, I just discovered that my gcc 3.4.6 allows me to use -mrelocatable with -fpie
> > -fpie is about the same as -fpic and -fPIE is similar to -fPIC
> > -fpie generates smaller code so one could consider using -fpie and -mrelocatable
> > However -fpic/-fpie needs some fixes to the relocation code, but a quick hack
> > by me works on my board.
> >
> > Does -fpie and -mrelocatable compile for you and do you have a non zero fixup section?
>
> -fpie and -mrelocatable does compile for me (tested on the XPedite5370
> with gcc 4.2.2) and has a non-zero fixup section.  However, the -fpie
> U-Boot image is slightly larger:
>
> ptyser at petert u-boot $ size u-boot.PIC
>    text      data       bss       dec       hex   filename
>  304300     28644     33156    366100     59614   u-boot.PIC
>
> ptyser at petert u-boot $ size u-boot.pie
>    text      data       bss       dec       hex   filename
>  304508     28624     33156    366288     596d0   u-boot.pie
>
> Let me know if I can provide any additional detail.

ehh, that is strange. Did you run a make clean in between?
Do you see any "bl _GLOBAL_OFFSET_TABLE_ at local-4" if you generate
assembler(-S)?
Maybe you had both -fPIC and -fpie defined?



More information about the U-Boot mailing list