From: Wolfgang Denk Date: Mon, 18 Oct 2010 22:39:48 +0200 Subject: [U-Boot] [PATCH] powerpc: do not fixup NULL ptrs In-Reply-To: <1287049904-18917-1-git-send-email-Joakim.Tjernlund@transmode.se> References: <1287049904-18917-1-git-send-email-Joakim.Tjernlund@transmode.se> Message-ID: <20101018203948.676071359B3@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Joakim Tjernlund, In message <1287049904-18917-1-git-send-email-Joakim.Tjernlund@transmode.se> you wrote: > 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 > --- > arch/powerpc/cpu/74xx_7xx/start.S | 4 +++- > arch/powerpc/cpu/mpc512x/start.S | 4 +++- > arch/powerpc/cpu/mpc5xx/start.S | 4 +++- > arch/powerpc/cpu/mpc5xxx/start.S | 4 +++- > arch/powerpc/cpu/mpc8220/start.S | 4 +++- > arch/powerpc/cpu/mpc824x/start.S | 4 +++- > arch/powerpc/cpu/mpc8260/start.S | 4 +++- > arch/powerpc/cpu/mpc83xx/start.S | 4 +++- > arch/powerpc/cpu/mpc85xx/start.S | 4 +++- > arch/powerpc/cpu/mpc86xx/start.S | 4 +++- > arch/powerpc/cpu/mpc8xx/start.S | 4 +++- > arch/powerpc/cpu/ppc4xx/start.S | 4 +++- > 12 files changed, 36 insertions(+), 12 deletions(-) Applied, thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de There is an order of things in this universe. -- Apollo, "Who Mourns for Adonais?" stardate 3468.1