[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Uncaught target signal 11 (Segmentation Faullt)
From: |
Libo Zhou |
Subject: |
Re: [Qemu-devel] Uncaught target signal 11 (Segmentation Faullt) |
Date: |
Mon, 2 Sep 2019 19:25:28 +0800 |
Adding some useful information, enabling strace gives me the following
messages. It looks like the segmentation fault is ultimately caused by missing
ld.so.nohwcap and ld.so.preload?
$ ./qemu-mips -L /usr/mips-linux-gnu -strace test
10255 brk(NULL) = 0x00412000
10255 mmap2(NULL,8192,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0) =
0x7f7c8000
10255 uname(0x7fffe8c8) = 0
10255 access("/etc/ld.so.nohwcap",F_OK) = -1 errno=2 (No such file or directory)
10255 access("/etc/ld.so.preload",R_OK) = -1 errno=2 (No such file or directory)
10255 openat(AT_FDCWD,"/etc/ld.so.cache",O_RDONLY|O_CLOEXEC) = 3
10255 fstat64(3,0x7fffe518) = 0
10255 mmap2(NULL,106802,PROT_READ,MAP_PRIVATE,3,0) = 0x7f7ad000
10255 close(3) = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=1, si_addr=0x2392d008} ---
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
[1] 10255 segmentation fault (core dumped) ./qemu-mips -strace test
------------------ Original ------------------
From: "Libo Zhou";<address@hidden>;
Send time: Monday, Sep 2, 2019 12:16 PM
To: "qemu-devel"<address@hidden>;
Subject: Uncaught target signal 11 (Segmentation Faullt)
I am trying to run a simple MIPS program with QEMU user mode.
Host: Ubuntu 18.04 LTS on x86_64
QEMU config: ../configure --target-list=mips-linux-user
Cross Compiler: sudo apt install gcc-mips-linux-gnu
My test.c is simple: int main(void) {int a = 1; int b =2; int c; c = a + b;
return 0;}
After compiling it with "mips-linux-gnu-gcc test.c -o test", I ran it with
"./qemu-mips -L /usr/mips-linux-gnu test", then I got the following error
message:
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Does anyone have a solution to this? Thank you in advance.
Cheers,
Libo