[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Problem with PPC user emulation.
From: |
Karel Gardas |
Subject: |
Re: [Qemu-devel] Problem with PPC user emulation. |
Date: |
Fri, 14 May 2004 21:26:48 +0200 (CEST) |
On Fri, 14 May 2004, Jocelyn Mayer wrote:
> On Fri, 2004-05-14 at 19:59, Karel Gardas wrote:
> > Hello,
> >
> > I've tried PPC user emulation provided by this week source tree, but w/o
> > success. I've tested crosstool's 4 test binaries (hello world in c/c++
> > static and dynamic) but all four crash with:
> >
> > thinkpad:/mnt/karel/cross-gcc/result/powerpc-405-linux-gnu/gcc-3.4.0-glibc-2.3.2/tmp$
> > ppc.sh ./powerpc-405-linux-gnu-hello
> > *** ERROR: idx a0 already assigned to a direct opcode
> > *** ERROR: unable to join indirect table idx [a0-37]
> > *** ERROR initializing PPC instruction 0xa0 0x37 0xfe
> > /opt/qemu-scripts/bin/ppc.sh: line 3: 3496 Segmentation fault
> > qemu-ppc -L
> > /mnt/karel/cross-gcc/result/powerpc-405-linux-gnu/gcc-3.4.0-glibc-2.3.2/powerpc-405-linux-gnu/
> > $@
> > thinkpad:/mnt/karel/cross-gcc/result/powerpc-405-linux-gnu/gcc-3.4.0-glibc-2.3.2/tmp$
> >
> > I used crosstool-0.28-pre13 for building ppc crosscompiler which is
> > gcc3.4.0 and glibc2.3.2 combination.
> >
>
> What is your host machine ?
Debian GNU/Linux 3.0.
> It seems there is a mess in the way sections are handled by this gcc
> version and/or for your host machine.
> This seems clear to me, because there can be no instruction with this
> opcode, as major opcode is 6 bits long in PPC and so can't be 0xa0.
>
> Could you please send me the qemu binary by mail, so I could check the
> executable structure (the opcode table structure, in fact...) ?
Sure! I will send you the smaller one (C statically linked hello world
app)
> But you may not be able to execute PPC405 dedicated binaries,
> as this CPU implements some instructions that aren't in the PPC spec
> then not emulated by Qemu.
Aha! This might be the issue.
> Those instructions seem not to be used in the
> program you tried, but you should check that you always compile with
> -mcpu=powerpc flag
> (not -mcpu=405) to get only generic PPC code, in order to execute inside Qemu.
Hmm, I'm afraid whole gcc/glibc is compiled probably with -mcpu=405...
Anyway, thanks for the hint.
Karel
--
Karel Gardas address@hidden
ObjectSecurity Ltd. http://www.objectsecurity.com
- [Qemu-devel] Problem with PPC user emulation., Karel Gardas, 2004/05/14
- Re: [Qemu-devel] Problem with PPC user emulation., Jocelyn Mayer, 2004/05/14
- Re: [Qemu-devel] Problem with PPC user emulation.,
Karel Gardas <=
- Re: [Qemu-devel] Problem with PPC user emulation., Jocelyn Mayer, 2004/05/14
- Re: [Qemu-devel] Problem with PPC user emulation., Karel Gardas, 2004/05/14
- Re: [Qemu-devel] Problem with PPC user emulation., Herbert Poetzl, 2004/05/14
- Re: [Qemu-devel] Problem with PPC user emulation., Karel Gardas, 2004/05/14
- Re: [Qemu-devel] Problem with PPC user emulation., J. Mayer, 2004/05/14