sparc32plus user test failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Invalid
|
Undecided
|
blueswirl |
Bug Description
Hello,
I try to execute on linux machine sparc binary (simple hello word application) using qemu-sparc32plus
and get segfault.Before test I copy all libraries and headers
(/usr/lib, /lib/, /usr/local/lib /usr/include /usr/local/include)
from original solaris workstation to separate directory on linux machine: /usr/cross/sysroot
I also copy statically builded qemu binaries and hello_world app in /usr/cross/
and start app as:
chroot /usr/cross/sysroot qemu-sparc32plus bin/hello_world
but also I get segfault.
As I see all necessary shared libs and interpreter (/usr/lib/ld.so.1)
exists in apropriate directories: /usr/lib, /lib/, /usr/local/lib
under new sysroot = /usr/cross/sysroot. I also try to run simple sparc32 app
using qemu-sparc32plus but also get segfault.
After that I try to run tests from linux-user-test-0.3 packet
but they also fail with qemu-sparc32plus emulation. I try to perform such test on different type of systems (see further)
and several version of qemu (builded from sources qemu-0.12.4 qemu-0.11.1 with configure && make ).
Probably I miss something in configuration or perform some wrong step with qemu-sparc32plus,
could you please clarify is sparc32plus user mode emulation is sucessfuly exists in the latest versions of qemu?
configuration of original Solaris sparc station where I build app:
bash-3.00# uname -a
SunOS fs650 5.10 Generic_137111-07 sun4us sparc FJSV,GPUZC-M
bash-3.00# gcc --version
gcc (GCC) 3.4.6
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
bash-3.00# psrinfo -v
Status of virtual processor 0 as of: 05/27/2010 12:23:06
on-line since 05/13/2010 18:40:47.
The sparcv9 processor operates at 1889 MHz,
and has a sparcv9 floating point processor.
............skipped 1 - 6......
Status of virtual processor 7 as of: 05/27/2010 12:23:06
on-line since 05/13/2010 18:41:14.
The sparcv9 processor operates at 1889 MHz,
and has a sparcv9 floating point processor.
source:
bash-3.00# cat sample.c
#include <stdio.h>
int main(int argc, char* argv[])
{
return 0;
}
compilation string:
bash-3.00# g++ -m32 -mcpu=v9 sample.c
bash-3.00# file a.out
a.out: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped, no debugging information available
configuration of 1st test machine - Debian Testing :
/home/dima# uname -a
Linux T291-2 2.6.32-trunk-686 #1 SMP Sun Jan 10 06:32:16 UTC 2010 i686 GNU/Linux
/home/dima# cat /etc/issue
Debian GNU/Linux squeeze/sid
/home/dima# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Pentium(R) Dual CPU E2160 @ 1.80GHz
stepping : 13
cpu MHz : 1799.624
cache size : 1024 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 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm
bogomips : 3599.24
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
.......
address sizes : 36 bits physical, 48 bits virtual
power management:
configuration of 2nd test machine - Debian Lenny stable:
dima@debian:
Linux debian 2.6.26-1-686 #1 SMP Sat Jan 10 18:29:31 UTC 2009 i686 GNU/Linux
dima@debian:
gcc (Debian 4.3.2-1.1) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
cpu - intel q6600
configuration of 3rd test machine: vmware image of SLES 11
cat /etc/issue
Welcome to SUSE Linux Enterprise Server 11 (x86_64) - Kernel \r (\l).
cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 15
model name : Intel(R) Xeon(R) CPU E5345 @ 2.33GHz
stepping : 8
cpu MHz : 2333.330
cache size : 4096 KB
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss syscall lm constant_tsc arch_perfmon pebs bts rep_good nopl pni ssse3 cx16 lahf_lm
bogomips : 4666.66
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
.......
processor : 3
gcc --version
gcc (SUSE Linux) 4.3.2 [gcc-4_3-branch revision 141291]
Copyright (C) 2008 Free Software Foundation, Inc.
Hello world execution results:
Hello_world
2 st machine:
chroot /usr/cross/sysroot qemu-sparc32plu
segfault
2 nd machine:
chroot /usr/cross/sysroot qemu-sparc32plu
segfault
3rd machine:
chroot /usr/cross/sysroot qemu-sparc32plu
segfault
Testing results:
testing result on Debian Testing:
T291-2:
[qemu-i386]
../linux/
-rw-r--r-- 1 500 users 0 Nov 12 2007 dummyfile
[qemu-arm]
../linux/
-rw-r--r-- 1 500 users 0 Nov 12 2007 dummyfile
[qemu-armeb]
../linux/
-rw-r--r-- 1 500 users 0 Nov 12 2007 dummyfile
[qemu-sparc]
../linux/
-rw-r--r-- 1 500 users 0 Nov 12 2007 dummyfile
[qemu-sparc32plus]
../linux/
ls: dummyfile: Value too large for defined data type
make: *** [test] Error 1
testing result on Debian Lenny:
dima@debian:
./qemu-
[qemu-i386]
../qemu-
-rw-r--r-- 1 dima dima 0 Nov 12 2007 dummyfile
[qemu-arm]
../qemu-
-rw-r--r-- 1 dima dima 0 Nov 12 2007 dummyfile
[qemu-armeb]
../qemu-
-rw-r--r-- 1 dima dima 0 Nov 12 2007 dummyfile
[qemu-sparc]
../qemu-
-rw-r--r-- 1 dima dima 0 Nov 12 2007 dummyfile
[qemu-sparc32plus]
../qemu-
make: *** [test] Error 127
dima@debian:
./qemu-
[qemu-i386]
../qemu-
-rw-r--r-- 1 dima dima 0 Nov 12 2007 dummyfile
[qemu-arm]
../qemu-
-rw-r--r-- 1 dima dima 0 Nov 12 2007 dummyfile
[qemu-armeb]
../qemu-
-rw-r--r-- 1 dima dima 0 Nov 12 2007 dummyfile
[qemu-sparc]
../qemu-
-rw-r--r-- 1 dima dima 0 Nov 12 2007 dummyfile
[qemu-sparc32plus]
../qemu-
ls: dummyfile: Value too large for defined data type
make: *** [test] Error 1
testing result on Sles 11 virtual image:
svn2:/home/
[qemu-i386]
../qemu-
-rw-r--r-- 1 500 users 0 Nov 12 2007 dummyfile
[qemu-arm]
../qemu-
-rw-r--r-- 1 500 users 0 Nov 12 2007 dummyfile
[qemu-armeb]
../qemu-
-rw-r--r-- 1 500 users 0 Nov 12 2007 dummyfile
[qemu-sparc]
../qemu-
-rw-r--r-- 1 500 users 0 Nov 12 2007 dummyfile
[qemu-sparc32plus]
../qemu-
ls: dummyfile: Value too large for defined data type
make: *** [test] Error 1
make test
[qemu-i386]
../qemu-
-rw-r--r-- 1 500 users 0 Nov 12 2007 dummyfile
[qemu-arm]
../qemu-
-rw-r--r-- 1 500 users 0 Nov 12 2007 dummyfile
[qemu-armeb]
../qemu-
-rw-r--r-- 1 500 users 0 Nov 12 2007 dummyfile
[qemu-sparc]
../qemu-
-rw-r--r-- 1 500 users 0 Nov 12 2007 dummyfile
[qemu-sparc32plus]
../linux/
ls: dummyfile: Value too large for defined data type
make: *** [test] Error 1
Best regards,
Dmitry Kruglov
On Thu, Jun 10, 2010 at 5:56 AM, kruglov.dima <email address hidden> wrote:
> Public bug reported:
>
> Hello,
>
> I try to execute on linux machine sparc binary (simple hello word application) using qemu-sparc32plus
> and get segfault.Before test I copy all libraries and headers
> (/usr/lib, /lib/, /usr/local/lib /usr/include /usr/local/include)
> from original solaris workstation to separate directory on linux machine: /usr/cross/sysroot
User emulation between different operating systems is not supported.
On Linux, the user emulator can execute Linux binaries from different
CPU architectures or ABIs. So Linux qemu-sparc32plus can only execute
Linux Sparc32plus binaries.
It should be possible to make a user emulator for Sparc32plus Solaris
binaries (for x86 Solaris) but there may be license issues.
> I also copy statically builded qemu binaries and hello_world app in /usr/cross/ sysroot/ bin ....... ....... .....
> and start app as:
> chroot /usr/cross/sysroot qemu-sparc32plus bin/hello_world
> but also I get segfault.
> As I see all necessary shared libs and interpreter (/usr/lib/ld.so.1)
> exists in apropriate directories: /usr/lib, /lib/, /usr/local/lib
> under new sysroot = /usr/cross/sysroot. I also try to run simple sparc32 app
> using qemu-sparc32plus but also get segfault.
>
> After that I try to run tests from linux-user-test-0.3 packet
> but they also fail with qemu-sparc32plus emulation. I try to perform such test on different type of systems (see further)
> and several version of qemu (builded from sources qemu-0.12.4 qemu-0.11.1 with configure && make ).
>
> Probably I miss something in configuration or perform some wrong step with qemu-sparc32plus,
> could you please clarify is sparc32plus user mode emulation is sucessfuly exists in the latest versions of qemu?
>
> configuration of original Solaris sparc station where I build app:
>
> bash-3.00# uname -a
> SunOS fs650 5.10 Generic_137111-07 sun4us sparc FJSV,GPUZC-M
> bash-3.00# gcc --version
> gcc (GCC) 3.4.6
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> bash-3.00# psrinfo -v
> Status of virtual processor 0 as of: 05/27/2010 12:23:06
> on-line since 05/13/2010 18:40:47.
> The sparcv9 processor operates at 1889 MHz,
> and has a sparcv9 floating point processor.
> ............skipped 1 - 6......
> Status of virtual processor 7 as of: 05/27/2010 12:23:06
> on-line since 05/13/2010 18:41:14.
> The sparcv9 processor operates at 1889 MHz,
> and has a sparcv9 floating point processor.
>
> source:
>
> bash-3.00# cat sample.c
> #include <stdio.h>
> int main(int argc, char* argv[])
> {
> printf("Hello word!\n");
> return 0;
> }
>
> compilation string:
>
> bash-3.00# g++ -m32 -mcpu=v9 sample.c
> bash-3.00# file a.out
> a.out: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+ Required, dynamically linked, not stripped, no debugging information available
>
> configuration of 1st test machine - Debian Testing :
> /home/dima# uname -a
> Linux T291-2 2.6.32-trunk-686 #1 SMP Sun Jan 10 06:32...