Subject: Re: Required functions for relocating not part of relocate section

From: Marcelo Tosatti <[email-masked]>
Date: Mon, 7 Nov 2005 09:48:17 -0200

On Mon, Nov 07, 2005 at 09:22:15AM -0700, Tom Rini wrote:
> On Fri, Nov 04, 2005 at 04:06:05PM -0200, Marcelo Tosatti wrote:
> 
> > Hi Paul,
> > 
> > Recent 2.6-git (from Wednesday) tree fails to boot on 8xx due to:
> [snip]
> > Problem is that flush_instruction_cache (and flush_data_cache)
> > from boot/common/util.S are not being copied to the relocate section,
> > even though the file contains the proper entry:
> > 
> >         .section ".relocate_code","xa"
> [snip]
> > The problem does not exist on v2.6.14.
> 
> What version of binutils / etc?  I recall a change in that area of code,
> but I thought it went in for 2.6.14..

marcelo@pegasos:~$ ld -v
GNU ld version 2.16.1 Debian GNU/Linux

marcelo@pegasos:~$ gcc -v
Reading specs from /usr/lib/gcc-lib/powerpc-linux/3.3.3/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc --disable-multilib powerpc-linux
Thread model: posix
gcc version 3.3.3 (Debian 20040401)

.config attached

To support an older bootloader the boards require (should not have
anything todo with the relocate section bug):

--- linux-2.6.14-rc4.orig/arch/ppc/boot/simple/head.S	2005-10-18 16:59:34.000000000 -0500
+++ linux-2.6.14-rc4/arch/ppc/boot/simple/head.S	2005-10-24 12:39:28.000000000 -0500
@@ -32,6 +32,17 @@
  *
  */
 
+#ifdef CONFIG_PRxK
+	.globl  start1
+start1: .long   0x00002120
+	.ascii  "Entry Point\x00"
+	.long   0x00000000
+	.long   0x00000000
+	.long   0x00000000
+	.long   0x00000000
+#endif
+
+
 	.globl	start
 start:
 	bl	start_