From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=39259 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Po17j-0004nS-HT for qemu-devel@nongnu.org; Fri, 11 Feb 2011 17:05:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Po17g-0000AX-RE for qemu-devel@nongnu.org; Fri, 11 Feb 2011 17:05:53 -0500 Received: from mail-vx0-f173.google.com ([209.85.220.173]:60204) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Po17g-0000AS-FB for qemu-devel@nongnu.org; Fri, 11 Feb 2011 17:05:52 -0500 Received: by vxb40 with SMTP id 40so1633262vxb.4 for ; Fri, 11 Feb 2011 14:05:52 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20110211194953.GA19467@tassilo.jf.intel.com> References: <20110211194953.GA19467@tassilo.jf.intel.com> From: Blue Swirl Date: Sat, 12 Feb 2011 00:05:31 +0200 Message-ID: Subject: Re: [Qemu-devel] qemu user x86 working? Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andi Kleen Cc: qemu-devel@nongnu.org On Fri, Feb 11, 2011 at 9:49 PM, Andi Kleen wrote: > Hi, > > Is the linux-user qemu for x86-64/i386 supposed to work? > > For example running it with a simple hello world on FC14 in gdb: > > /home/ak/tsrc/hello: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),= dynamically linked (uses shared libs), for GNU/Linux 2.6.32, not stripped > > [Thread debugging using libthread_db enabled] > ERROR: ioctl(SNDCTL_DSP_MAPINBUF): target=3D0x80085013 host=3D0x80105013 > ERROR: ioctl(SNDCTL_DSP_MAPOUTBUF): target=3D0x80085014 host=3D0x80105014 > > Program received signal SIGSEGV, Segmentation fault. > 0x000000006021f854 in static_code_gen_buffer () > (gdb) disp/3i $pc > 1: x/3i $pc > =3D> 0x6021f854 : =C2=A0mov =C2=A0 =C2=A0(= %rbx),%rbp > =C2=A0 0x6021f857 : =C2=A0mov =C2=A0 =C2= =A00x28(%r14),%rbx > =C2=A0 0x6021f85b : > =C2=A0 =C2=A0add =C2=A0 =C2=A0$0xffffffffffffff88,%rbx > (gdb) p $rbx > $2 =3D 0 > > I tested a few releases back, 0.13 and also 14-rc0 and they > all segfault, although they are not all in the same place. > The qemu-user shipped by Fedora also seems to have the same problem. > > Is this a known issue or am I doing something obviously wrong? I don't have any problems running a statically linked x86_64 helloworld program in an i386 chroot. Dynamically linked programs try to use wrong libraries, but at least running /lib64/ld-linux-x86-64.so.2 directly works.