[U-Boot] [PATCH 2/2] PowerPC, nand_spl: Add relocation support for -fpic

Joakim Tjernlund joakim.tjernlund at transmode.se
Sat Dec 11 10:08:50 CET 2010


Scott Wood <scottwood at freescale.com> wrote on 2010/12/10 21:34:59:
>
> On Thu, 9 Dec 2010 21:30:16 +0100
> Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:
>
> > > > If not, is there anything special I need to test it (specific
> > > > toolchain?) besides these two patches?
> > >
> > > No, not yet. The real benefit comes in later patches. Just
> > > makes sure it works as before.
>
> I applied those two patches on top of next, and it boots OK.
>
> I added -fpic to PLATFORM_RELFLAGS, still boots OK.
>
> > Well, one thing should work now. nand_spl does not use fixups
> > so you should be able to remove -mrelocatable and just use -fpic.
>
> If I remove -mrelocatable (with or without -fpic in place) I get
> ERROR: Your compiler doesn't generate .fixup sections!
>        Upgrade to a recent toolchain.

Seems like nand_spl borrows the Makefile under arch/powerpc/ which won't work
as the normal powerpc boards needs .fixups and has a test for that.
In addition the test is a bit flawed, it checks the object files for .fixups
instead of checking the toolchain.
Obviously this will have to be fixed before one can remove -mrelocatable just for nand_spl.
On the other hand, removing -mrelocatable won't be needed when you use my gcc patches which
will be in gcc 4.6



More information about the U-Boot mailing list