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

Joakim Tjernlund joakim.tjernlund at transmode.se
Tue Oct 12 23:06:26 CEST 2010


Scott Wood <scottwood at freescale.com> wrote on 2010/10/12 22:48:59:
> 
> On Tue, 12 Oct 2010 22:40:27 +0200
> Joakim Tjernlund <joakim.tjernlund at transmode.se> wrote:
> 
> > Scott Wood <scottwood at freescale.com> wrote on 2010/10/12 22:16:14:
> > > The link address is of the pre-relocation NAND buffer.
> > 
> > hmm, then I don't understand how you get by. Initialized static/global
> > ptrs should point into some random area.
> 
> It suspect we just don't have any such pointers in the SPL.

Good for you :)

One could ban these in all of u-boot too. The relocation would
be much simpler for those arch's lacking -mrelocatable.

I suspect there are some low hanging fruits to be picked too:
 char *mystr = "hello"
can often be rewritten as
 char mystr[] = "hello"
which won't cause fixups and smaller code too.



More information about the U-Boot mailing list