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

Joakim Tjernlund joakim.tjernlund at transmode.se
Wed Sep 23 14:33:05 CEST 2009


Stefan Roese <sr at denx.de> wrote on 23/09/2009 14:24:34:
>
> On Wednesday 23 September 2009 13:51:46 Joakim Tjernlund wrote:
> > NULL is an absolute value and should not be relocated.
> > After this correction code like:
> >  void weak_fun(void) __attribute__((weak));
> >  printf("weak_fun:%p\n", weak_fun);
> > will still print null after relocation.
> >
> > Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund at transmode.se>
> > ---
> >
> > I have only tested this on 83xx and on a somewhat older u-boot.
> > The change is exactly the same on all PowerPC platforms though.
> >
> >  cpu/mpc512x/start.S |    6 ++++--
> >  cpu/mpc5xx/start.S  |    6 ++++--
> >  cpu/mpc5xxx/start.S |    6 ++++--
> >  cpu/mpc8220/start.S |    6 ++++--
> >  cpu/mpc824x/start.S |    6 ++++--
> >  cpu/mpc8260/start.S |    6 ++++--
> >  cpu/mpc83xx/start.S |    6 ++++--
> >  cpu/mpc85xx/start.S |    6 ++++--
> >  cpu/mpc86xx/start.S |    6 ++++--
> >  cpu/mpc8xx/start.S  |    6 ++++--
>
> Thanks. But I think you missed ppc4xx here:
>
> cpu/ppc4xx/start.S

oops, if you rename ppc4xx to mpc4xx such mistakes can be avoided.

     Jocke



More information about the U-Boot mailing list