]> git.karo-electronics.de Git - karo-tx-uboot.git/commit - arch/powerpc/cpu/74xx_7xx/start.S
powerpc: do not fixup NULL ptrs
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
Thu, 14 Oct 2010 09:51:44 +0000 (11:51 +0200)
committerWolfgang Denk <wd@denx.de>
Mon, 18 Oct 2010 20:39:37 +0000 (22:39 +0200)
commitd1e0b10accdbac2e0a8b2cbf7c589645442f87c5
treeb818dd380265c89f435900b03c49a1cbf07534d4
parentd98b0523cfaaedeecb263b15c121c0727b0d80b9
powerpc: do not fixup NULL ptrs

The fixup routine must not fixup NULL pointers.
Problem can be seen by
 char *testfun(void) __attribute__((weak));
 char *(*myfun)(void) = testfun;

Then add
  printf("myfun:%p, &myfun:%p\n", myfun, &myfun);
before relocation and after relocation.
myfun should be NULL in both cases but it is not.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
12 files changed:
arch/powerpc/cpu/74xx_7xx/start.S
arch/powerpc/cpu/mpc512x/start.S
arch/powerpc/cpu/mpc5xx/start.S
arch/powerpc/cpu/mpc5xxx/start.S
arch/powerpc/cpu/mpc8220/start.S
arch/powerpc/cpu/mpc824x/start.S
arch/powerpc/cpu/mpc8260/start.S
arch/powerpc/cpu/mpc83xx/start.S
arch/powerpc/cpu/mpc85xx/start.S
arch/powerpc/cpu/mpc86xx/start.S
arch/powerpc/cpu/mpc8xx/start.S
arch/powerpc/cpu/ppc4xx/start.S