qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] qemu-ppc v0.10.2 linux: segfault on all ppc binaries


From: Jay Schulist
Subject: [Qemu-devel] qemu-ppc v0.10.2 linux: segfault on all ppc binaries
Date: Tue, 21 Apr 2009 12:31:18 -0700

Hello,

I'm using qemu-ppc v0.10.2 on Intel x86 Fedora 11 and I can't get any PPC binaries to work, every binary fails to execute (even hello world) and ends up with a segmentation fault (the crash is included below).

I have noticed that every program never seems to get past doing an mmap or mmap2.

I'm using a PPC cross-compiler and sys-root made from crosstools-ng's standard powerpc-unknown-linux-gnu configuration. This binary works fine on an actual PPC-linux system, but never using qemu-ppc. I've tried many different combinations of gcc/glibc for the cross-compiler and it hasn't seemed to make any difference.

Any help would be greatly appreciated as I'm not sure what to try next to debug this issue. In case it helps, I've included the the crash, qemu version, hello.c program, /proc/cpu output, and gcc -v information.

Thank you,

Jay Schulist

-------------------------

address@hidden ~]$ qemu-ppc -strace -L /opt/x-tools8/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu//sys-root ~/hello

17637 brk(0,1074284272,0,1074462048,1074458432,0) = 0x10012000

17637 mmap(0,4096,3,34,-1,0) = 0x42081000

17637 uname(0x4007f120) = 0

17637 access("/etc/ld.so.preload",04) = -1 errno=2 (No such file or directory)

17637 open("/etc/ld.so.cache",0,01) = 3

17637 fstat64(3,0x4007ebf0) = 0

17637 mmap(0,86927,1,2,3,0) = 0x42082000

17637 close(3) = 0

Invalid data memory access: 0xf2202008

NIP 4008aea8 LR 4008a9e8 CTR 00000000 XER 00000000

MSR 00006040 HID0 00000000 HF 00006000 idx 0

TB 00000000 00000000

GPR00 000000004209738f 000000004007ec78 0000000000000000 00000000a2382010

GPR04 000000004009c414 0000000000000000 0000000000000002 0000000000000003

GPR08 0000000042082000 00000000f2201ff4 000000004208200b 000000000001538f

GPR12 0000000040090764 0000000000000000 00000000400aed10 000000004007ecd8

GPR16 000000004007eee0 000000004007ecdc 000000000000000a 000000004009c24c

GPR20 0000000000000000 000000001000022c 0000000000000000 0000000042082000

GPR24 00000000ffffffff 0000000042081000 00000000a2382010 000000009fd1537f

GPR28 000000004803ffff 000000002401ffff 00000000400af7c0 0000000042082000

CR 44002002 [ G G - - E - - E ] RES ffffffff

FPR00 0000000000000000 0000000000000000 0000000000000000 0000000000000000

FPR04 0000000000000000 0000000000000000 0000000000000000 0000000000000000

FPR08 0000000000000000 0000000000000000 0000000000000000 0000000000000000

FPR12 0000000000000000 0000000000000000 0000000000000000 0000000000000000

FPR16 0000000000000000 0000000000000000 0000000000000000 0000000000000000

FPR20 0000000000000000 0000000000000000 0000000000000000 0000000000000000

FPR24 0000000000000000 0000000000000000 0000000000000000 0000000000000000

FPR28 0000000000000000 0000000000000000 0000000000000000 0000000000000000

FPSCR 00000000

Segmentation fault

address@hidden ~]$ qemu-ppc -v

qemu-ppc version 0.10.2, Copyright (c) 2003-2008 Fabrice Bellard

usage: qemu-ppc [options] program [arguments...]

Linux CPU emulator (compiled for ppc emulation)

Standard options:

-h print this help

-g port wait gdb connection to port

-L path set the elf interpreter prefix (default=/usr/gnemul/qemu-ppc)

-s size set the stack size in bytes (default=524288)

-cpu model select CPU (-cpu ? for list)

-drop-ld-preload drop LD_PRELOAD for target process

-E var=value sets/modifies targets environment variable(s)

-U var unsets targets environment variable(s)

Debug options:

-d options activate log (logfile=/tmp/qemu.log)

-p pagesize set the host page size to 'pagesize'

-strace log system calls

Environment variables:

QEMU_STRACE Print system calls and arguments similar to the

'strace' program. Enable by setting to any value.

You can use -E and -U options to set/unset environment variables

for target process. It is possible to provide several variables

by repeating the option. For example:

-E var1=val2 -E var2=val2 -U LD_PRELOAD -U LD_DEBUG

Note that if you provide several changes to single variable

last change will stay in effect.

address@hidden ~]$ cat hello.c

#include <stdio.h>

int main(void) {

printf("hello world\n");

return 0;

}

address@hidden ~]$ /opt/x-tools8/powerpc-unknown-linux-gnu/bin/powerpc-unknown-linux-gnu-gcc -Wall -o hello hello.c

address@hidden ~]$ file hello

hello: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.29, with unknown capability 0x41000000 = 0x11676e75, with unknown capability 0x10000 = 0x90401, not stripped

address@hidden ~]$ /opt/x-tools8/powerpc-unknown-linux-gnu/bin/powerpc-unknown-linux-gnu-gcc -v

Using built-in specs.

Target: powerpc-unknown-linux-gnu

Configured with: /opt/crosstool-ng/targets/src/gcc-4.3.2/configure --build=i386-build_redhat-linux-gnu --host=i386-build_redhat-linux-gnu --target=powerpc-unknown-linux-gnu --prefix=/root/x-tools8/powerpc-unknown-linux-gnu --with-sysroot=/root/x-tools8/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu//sys-root --enable-languages=c,c++ --disable-multilib --with-gmp=/root/x-tools8/powerpc-unknown-linux-gnu --with-mpfr=/root/x-tools8/powerpc-unknown-linux-gnu address@hidden --enable-__cxa_atexit --with-local-prefix=/root/x-tools8/powerpc-unknown-linux-gnu/powerpc-unknown-linux-gnu//sys-root --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-c99 --enable-long-long --enable-target-optspace

Thread model: posix

gcc version 4.3.2 (address@hidden)

address@hidden ~]$ cat /proc/cpuinfoprocessor : 0

vendor_id : GenuineIntel

cpu family : 6

model : 15

model name : Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz

stepping : 11

cpu MHz : 2333.331

cache size : 4096 KB

physical id : 0

siblings : 2

core id : 0

cpu cores : 2

apicid : 0

initial apicid : 0

fdiv_bug : no

hlt_bug : no

f00f_bug : no

coma_bug : no

fpu : yes

fpu_exception : yes

cpuid level : 10

wp : yes

flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_t

sc arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm lahf_lm tpr_shadow vnmi flexpriority

bogomips : 4654.94

clflush size : 64

power management:

processor : 1

vendor_id : GenuineIntel

cpu family : 6

model : 15

model name : Intel(R) Core(TM)2 Duo CPU E6550 @ 2.33GHz

stepping : 11

cpu MHz : 2333.331

cache size : 4096 KBphysical id : 0

siblings : 2

core id : 1

cpu cores : 2

apicid : 1

initial apicid : 1

fdiv_bug : no

hlt_bug : no

f00f_bug : no

coma_bug : no

fpu : yes

fpu_exception : yes

cpuid level : 10

wp : yes

flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_t

sc arch_perfmon pebs bts pni dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm lahf_lm tpr_shadow vnmi flexpriority

bogomips : 4654.75

clflush size : 64

power management:
reply via email to

[Prev in Thread] Current Thread [Next in Thread]