From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Hdun5-0008Br-GD for qemu-devel@nongnu.org; Tue, 17 Apr 2007 17:00:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Hdun3-0008BX-Um for qemu-devel@nongnu.org; Tue, 17 Apr 2007 17:00:43 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Hdun3-0008BU-PY for qemu-devel@nongnu.org; Tue, 17 Apr 2007 17:00:41 -0400 Received: from grayson.netsweng.com ([207.235.77.11]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HduiI-0002G2-60 for qemu-devel@nongnu.org; Tue, 17 Apr 2007 16:55:46 -0400 Received: from amavis by grayson.netsweng.com with scanned-ok (Exim 3.36 #1 (Debian)) id 1HduiH-000774-00 for ; Tue, 17 Apr 2007 16:55:45 -0400 Received: from grayson.netsweng.com ([127.0.0.1]) by localhost (grayson.netsweng.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0Wx99uXA98IB for ; Tue, 17 Apr 2007 16:55:27 -0400 (EDT) Received: from h211.241.141.67.ip.alltel.net ([67.141.241.211] helo=trantor.stuart.netsweng.com) by grayson.netsweng.com with esmtp (Exim 3.36 #1 (Debian)) id 1Hduhz-00070s-00 for ; Tue, 17 Apr 2007 16:55:27 -0400 Date: Tue, 17 Apr 2007 16:55:06 -0400 (EDT) From: Stuart Anderson Subject: Re: [Qemu-devel] linux-user target In-Reply-To: <1176228712.22569.27.camel@jma4.dev.netgem.com> Message-ID: References: <1176228712.22569.27.camel@jma4.dev.netgem.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Tue, 10 Apr 2007, Jocelyn Mayer wrote: >> PPC: >> >> I am unable to get any executable to run. >> >> >> projects:~/upstream/qemu# ./ppc-linux-user/qemu-ppc -L /mirror0/chroots/ppc/ /mirror0/chroots/ppc/bin/bash >> init_ppc_proc: PVR 00080000 mask ffffffff => 00080000 >> Segmentation fault >> projects:~/upstream/qemu# > > Just checked, on an amd64 host with a random powerpc bash version I got > on my hard disk drive: > > ./ppc-linux-user/qemu-ppc > -L /mnt/local/hdc/part3/PPC/linux/archives /mnt/local/hdc/part3/PPC/linux/archives/bin/bash --version > init_ppc_proc: PVR 00080000 mask ffffffff => 00080000 > GNU bash, version 2.05a.0(1)-release (powerpc-unknown-linux-gnu) > Copyright 2001 Free Software Foundation, Inc. > > I also tried to really launch the shell and use it and it worked. > > ... I have to admit there are some strange behaviors with some > features... > > But I think recent builds using glibc with TLS/NPTL would not run. I've continued to work on this all week, and I still haven't managed to solve it. I've chased down a lot of paths, but none of them have lead to a solution. Here is a summary of the situation now. * programs other than bash will run * bash --version will run * bash --noediting will run * occasionally, bash has run if I'm stracing it, but I can't always reproduce it. * when it runs, I occasionally see some odd behavior, but not always. The termios patch I just sent cleared up a lot of the oddness. * when it runs, it hangs on exit. Killing it logs me all the way out of the system (ssh conection). * when it crashes, gdb looses the user level thread, so I can't do any debugging * I don't see any of the TLS related system calls being called. I also don't see any concrete proof one way or another that it is used in the executable (ie No R_PPC_*TLS relocations). I've been digging in the kernel & glibc source, and I don't see a lot of special code to support TLS on ppc. It mostly seems to be just taking care to not step on R2. Glibc seems to be the only place where it knows something specific about TLS, which leads me to think that TLS is mostly contain within the userspace on PPC. * I've tried turning on most of the DEBUG_ defines under linux-user, but none of them has yielded anything useful, or noteworthy. Whew.. I'm in need a of a fresh idea or three. Stuart Stuart R. Anderson anderson@netsweng.com Network & Software Engineering http://www.netsweng.com/ 1024D/37A79149: 0791 D3B8 9A4C 2CDC A31F BD03 0A62 E534 37A7 9149