From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zipcode.az.mvista.com (unknown [65.200.49.156]) by ozlabs.org (Postfix) with ESMTP id 60EA8DE0CD for ; Wed, 21 Mar 2007 07:09:05 +1100 (EST) Date: Tue, 20 Mar 2007 13:09:53 -0700 From: "Mark A. Greer" To: Milton Miller Subject: Re: [PATCH 5/7] bootwrapper: missing relocation in crt0.S Message-ID: <20070320200953.GC16902@mag.az.mvista.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: Cc: linuxppc-dev@ozlabs.org, Paul Mackerras List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, Mar 19, 2007 at 02:58:05PM -0600, Milton Miller wrote: > Index: kernel/arch/powerpc/boot/crt0.S > =================================================================== > --- kernel.orig/arch/powerpc/boot/crt0.S 2007-03-16 23:22:00.000000000 -0500 > +++ kernel/arch/powerpc/boot/crt0.S 2007-03-16 23:42:42.000000000 -0500 > @@ -63,21 +63,30 @@ _zimage_start: > /* Clear the BSS */ > lis r9,__bss_start@ha > addi r9,r9,__bss_start@l > + add r9,r0,r9 > lis r8,_end@ha > addi r8,r8,_end@l > + add r8,r0,r8 > li r0,0 ^^ Use some reg other than r0? > 5: stw r0,0(r9) > addi r9,r9,4 > cmplw cr0,r9,r8 > blt 5b > > + /* recreate relocation offset */ > + lis r9,_end@ha > + addi r9,r9,_end@l > + subf r0,r9,r8 > + Wouldn't it make sense to just use another reg to zero out the bss so you don't have to recreate the relocation offset? Mark