From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HWxuy-0004NC-8g for qemu-devel@nongnu.org; Thu, 29 Mar 2007 12:56:08 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HWxux-0004My-H1 for qemu-devel@nongnu.org; Thu, 29 Mar 2007 12:56:07 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HWxux-0004Mu-Bu for qemu-devel@nongnu.org; Thu, 29 Mar 2007 11:56:07 -0500 Received: from static-71-162-243-5.phlapa.fios.verizon.net ([71.162.243.5] helo=grelber.thyrsus.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1HWxsL-0001Fx-75 for qemu-devel@nongnu.org; Thu, 29 Mar 2007 12:53:25 -0400 From: Rob Landley Date: Thu, 29 Mar 2007 12:53:16 -0400 References: <1175155534.1597.13.camel@gentoo-jocke.transmode.se> In-Reply-To: <1175155534.1597.13.camel@gentoo-jocke.transmode.se> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200703291253.17092.rob@landley.net> Subject: [Qemu-devel] Re: Powerpc crt1.S change faulty Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: joakim.tjernlund@transmode.se Cc: uclibc@uclibc.org, qemu-devel@nongnu.org On Thursday 29 March 2007 4:05 am, Joakim Tjernlund wrote: > Hi Rob > > I saw your change to powerpc crt1.S and I don't agree with it. > mr r8,r3 copies r3 to r8 > r8 needs to maps to rtld_fini in __uClibc_main and that maps to > _dl_fini. Basically you have broken dynamic apps. Sigh. Ok. What does the comment mean, then? > For static apps NULL must be passed in r8 and currenly > crt1.S relies on the kernel to zero r3(since r3 holds > the return value of exec) before handing over user space. > If this no longer is true we are in deep sh*** > > Can you check if r3 is zero in your kernel? what kernel version > are you using? Are you using QEMU? Yup. I'm using qemu-ppc, and without this change a statically linked "hello world" segfaults on exit (but not on _exit()). Lemme forward this message to the qemu list. For reference, the change is: http://uclibc.org/cgi-bin/viewcvs.cgi?rev=18270&view=rev > Jocke Rob -- Vista: Windows Millenium Second Edition