Re: [Qemu-devel] [PATCH] SH4 Fix missing 6th arg of syscall.
Hello Fabrce-san, I uploaded this URL http://club.lineo.co.jp/~asa/ 4535036 qemu-sh4eb.tar.bz2 Regards, -- On Wed, 21 Nov 2007 10:50:22 +0100 Fabrice Bellard <[EMAIL PROTECTED]> wrote: > Can you provide a glibc and busybox binary for sh4eb so that I can > include them in the linux user tests ? > > Regards, > > Fabrice. > > Tomoyoshi ASANO wrote: > > Hello, > > > > I tested big-endian binaries by sh4(eb)-linux-user > > with a small patch(attached) for building sh4eb-linux-user. > > But I don't understand that this patch is needed or not. > > > > sh4eb-linux-user is OK using static link binaries. > > > > But I feel that sh4eb-linux-users has some problem(?) > > using dynamic link binaries. > > > > 1) If host-os has /etc/ld.so.cache, sh4eb-linux-users is NG. > > > > [EMAIL PROTECTED] ~] qemu-sh4eb -strace /usr/qemu-sh4eb/bin/busybox > > 28575 uname(0x4007f818) = 0 > > 28575 brk(0,132617,1074264468,57,1074325300,4096) = 0x00487000 > > 28575 access("/etc/ld.so.preload",04) = -1 errno=2 (No such file or > > directory) > > 28575 open("/etc/ld.so.cache",0,01) = 3 > > 28575 fstat64(3,0x4007f234) = 0 > > 28575 mmap(0,66277,1,2,3,0) = 0x42081000 > > 28575 close(3) = 0 > > Unhandled trap: 0xa0 > > pc=0x400870d0 sr=0x8001 pr=0x40086e32 fpscr=0x0008 > > r0=0x0348 r1=0xb61a0ff4 r2=0x2a2c1010 r3=0x000c > > r4=0x400a4000 r5=0x40092afc r6=0x000b r7=0x0002 > > r8=0x7411fff4 r9=0x000102e5 r10=0x1f017fff r11=0x17dd02d5 > > r12=0x400a4000 r13=0x3e02 r14=0x4007f2b0 r15=0x4007f2b0 > > r16=0x r17=0x r18=0x r19=0x > > r20=0x r21=0x r22=0x r23=0x > > > > But if no /etc/ld.so.cache in host-os, sh4eb-linux-users is OK. > > > > 2) If host-os has /lib/tls/*, sh4eb-linux-users is NG. > > > > [EMAIL PROTECTED] ~] qemu-sh4eb -strace /usr/qemu-sh4eb/bin/busybox > > 28580 uname(0x4007f818) = 0 > > 28580 brk(0,132617,1074264468,57,1074325300,4096) = 0x00487000 > > 28580 access("/etc/ld.so.preload",04) = -1 errno=2 (No such file or > > directory) > > 28580 open("/etc/ld.so.cache",0,01) = -1 errno=2 (No such file or > > directory) > > 28580 open("/lib/tls/libm.so.6",0,012) = 3 > > 28580 read(3,0x4007f308,512) = 512 > > 28580 close(3) = 0 > > 28580 writev(2,0x4007efb8,0xa)/usr/qemu-sh4eb/bin/busybox: error > > while loading shared libraries: /lib/tls/libm.so.6: ELF file data > > encoding not big-endian > > = 125 > > 28580 exit_group(127) > > > > But if no /lib/tls in host-os, sh4eb-linux-users is OK. > > > > please help if possible. > > > > Thanks, > > -- > > > > On Wed, 21 Nov 2007 10:43:49 +0900 > > Tomoyoshi ASANO <[EMAIL PROTECTED]> wrote: > > > >> Hell, > >> > >> This is very nice! > >> > >> I tested using glibc-2.5 > >> It seems good. > >> > >> Thank you > >> > >> On Wed, 21 Nov 2007 09:24:41 +0900 > >> "Magnus Damm" <[EMAIL PROTECTED]> wrote: > >> > >>> Hi there, > >>> > >>> On Nov 20, 2007 11:48 PM, <[EMAIL PROTECTED]> wrote: > I found 6th arg for syscall is missing on SH4 linux-user emulation. > This seems to be the cause of shared library mapping failure. > I successfully run shared-lib'd binary, after applying following fix. > >>> Hehe, I managed to create the exact same patch yesterday evening. So > >>> this email is just to acknowledge this fix. Dynamically linked > >>> binaries using uclibc-0.9.29 or glibc-2.3.6 both work well. Thank you. > >>> > >>> / magnus > >>> > >
Re: [Qemu-devel] [PATCH] SH4 Fix missing 6th arg of syscall.
Can you provide a glibc and busybox binary for sh4eb so that I can include them in the linux user tests ? Regards, Fabrice. Tomoyoshi ASANO wrote: Hello, I tested big-endian binaries by sh4(eb)-linux-user with a small patch(attached) for building sh4eb-linux-user. But I don't understand that this patch is needed or not. sh4eb-linux-user is OK using static link binaries. But I feel that sh4eb-linux-users has some problem(?) using dynamic link binaries. 1) If host-os has /etc/ld.so.cache, sh4eb-linux-users is NG. [EMAIL PROTECTED] ~] qemu-sh4eb -strace /usr/qemu-sh4eb/bin/busybox 28575 uname(0x4007f818) = 0 28575 brk(0,132617,1074264468,57,1074325300,4096) = 0x00487000 28575 access("/etc/ld.so.preload",04) = -1 errno=2 (No such file or directory) 28575 open("/etc/ld.so.cache",0,01) = 3 28575 fstat64(3,0x4007f234) = 0 28575 mmap(0,66277,1,2,3,0) = 0x42081000 28575 close(3) = 0 Unhandled trap: 0xa0 pc=0x400870d0 sr=0x8001 pr=0x40086e32 fpscr=0x0008 r0=0x0348 r1=0xb61a0ff4 r2=0x2a2c1010 r3=0x000c r4=0x400a4000 r5=0x40092afc r6=0x000b r7=0x0002 r8=0x7411fff4 r9=0x000102e5 r10=0x1f017fff r11=0x17dd02d5 r12=0x400a4000 r13=0x3e02 r14=0x4007f2b0 r15=0x4007f2b0 r16=0x r17=0x r18=0x r19=0x r20=0x r21=0x r22=0x r23=0x But if no /etc/ld.so.cache in host-os, sh4eb-linux-users is OK. 2) If host-os has /lib/tls/*, sh4eb-linux-users is NG. [EMAIL PROTECTED] ~] qemu-sh4eb -strace /usr/qemu-sh4eb/bin/busybox 28580 uname(0x4007f818) = 0 28580 brk(0,132617,1074264468,57,1074325300,4096) = 0x00487000 28580 access("/etc/ld.so.preload",04) = -1 errno=2 (No such file or directory) 28580 open("/etc/ld.so.cache",0,01) = -1 errno=2 (No such file or directory) 28580 open("/lib/tls/libm.so.6",0,012) = 3 28580 read(3,0x4007f308,512) = 512 28580 close(3) = 0 28580 writev(2,0x4007efb8,0xa)/usr/qemu-sh4eb/bin/busybox: error while loading shared libraries: /lib/tls/libm.so.6: ELF file data encoding not big-endian = 125 28580 exit_group(127) But if no /lib/tls in host-os, sh4eb-linux-users is OK. please help if possible. Thanks, -- On Wed, 21 Nov 2007 10:43:49 +0900 Tomoyoshi ASANO <[EMAIL PROTECTED]> wrote: Hell, This is very nice! I tested using glibc-2.5 It seems good. Thank you On Wed, 21 Nov 2007 09:24:41 +0900 "Magnus Damm" <[EMAIL PROTECTED]> wrote: Hi there, On Nov 20, 2007 11:48 PM, <[EMAIL PROTECTED]> wrote: I found 6th arg for syscall is missing on SH4 linux-user emulation. This seems to be the cause of shared library mapping failure. I successfully run shared-lib'd binary, after applying following fix. Hehe, I managed to create the exact same patch yesterday evening. So this email is just to acknowledge this fix. Dynamically linked binaries using uclibc-0.9.29 or glibc-2.3.6 both work well. Thank you. / magnus
Re: [Qemu-devel] [PATCH] SH4 Fix missing 6th arg of syscall.
Hi there, On Nov 21, 2007 2:07 PM, Tomoyoshi ASANO <[EMAIL PROTECTED]> wrote: > I tested big-endian binaries by sh4(eb)-linux-user > with a small patch(attached) for building sh4eb-linux-user. > But I don't understand that this patch is needed or not. I'm not sure if that patch is all that is needed. You may need to change more things like TARGET_WORDS_BIGENDIAN in the configure script. > sh4eb-linux-user is OK using static link binaries. > > But I feel that sh4eb-linux-users has some problem(?) > using dynamic link binaries. > > 1) If host-os has /etc/ld.so.cache, sh4eb-linux-users is NG. [snip log] > But if no /etc/ld.so.cache in host-os, sh4eb-linux-users is OK. > > 2) If host-os has /lib/tls/*, sh4eb-linux-users is NG. [snip log] > But if no /lib/tls in host-os, sh4eb-linux-users is OK. > > please help if possible. I have not tested sh in big endian mode yet, so I'm not sure what issues you may run into. I have however noticed that regardless of endian target libraries may feel the need of loading host files such as /etc/ld.so.cache which in turn may lead to some serious confusion. Maybe the path remapping engine in scratchbox2 solves this issue? http://www.freedesktop.org/wiki/Software/sbox2 The release sbox2-1.99.0.19 does not support SH out of the box, but the latest git version should be ok. Good luck! / magnus
Re: [Qemu-devel] [PATCH] SH4 Fix missing 6th arg of syscall.
Hello, I tested big-endian binaries by sh4(eb)-linux-user with a small patch(attached) for building sh4eb-linux-user. But I don't understand that this patch is needed or not. sh4eb-linux-user is OK using static link binaries. But I feel that sh4eb-linux-users has some problem(?) using dynamic link binaries. 1) If host-os has /etc/ld.so.cache, sh4eb-linux-users is NG. [EMAIL PROTECTED] ~] qemu-sh4eb -strace /usr/qemu-sh4eb/bin/busybox 28575 uname(0x4007f818) = 0 28575 brk(0,132617,1074264468,57,1074325300,4096) = 0x00487000 28575 access("/etc/ld.so.preload",04) = -1 errno=2 (No such file or directory) 28575 open("/etc/ld.so.cache",0,01) = 3 28575 fstat64(3,0x4007f234) = 0 28575 mmap(0,66277,1,2,3,0) = 0x42081000 28575 close(3) = 0 Unhandled trap: 0xa0 pc=0x400870d0 sr=0x8001 pr=0x40086e32 fpscr=0x0008 r0=0x0348 r1=0xb61a0ff4 r2=0x2a2c1010 r3=0x000c r4=0x400a4000 r5=0x40092afc r6=0x000b r7=0x0002 r8=0x7411fff4 r9=0x000102e5 r10=0x1f017fff r11=0x17dd02d5 r12=0x400a4000 r13=0x3e02 r14=0x4007f2b0 r15=0x4007f2b0 r16=0x r17=0x r18=0x r19=0x r20=0x r21=0x r22=0x r23=0x But if no /etc/ld.so.cache in host-os, sh4eb-linux-users is OK. 2) If host-os has /lib/tls/*, sh4eb-linux-users is NG. [EMAIL PROTECTED] ~] qemu-sh4eb -strace /usr/qemu-sh4eb/bin/busybox 28580 uname(0x4007f818) = 0 28580 brk(0,132617,1074264468,57,1074325300,4096) = 0x00487000 28580 access("/etc/ld.so.preload",04) = -1 errno=2 (No such file or directory) 28580 open("/etc/ld.so.cache",0,01) = -1 errno=2 (No such file or directory) 28580 open("/lib/tls/libm.so.6",0,012) = 3 28580 read(3,0x4007f308,512) = 512 28580 close(3) = 0 28580 writev(2,0x4007efb8,0xa)/usr/qemu-sh4eb/bin/busybox: error while loading shared libraries: /lib/tls/libm.so.6: ELF file data encoding not big-endian = 125 28580 exit_group(127) But if no /lib/tls in host-os, sh4eb-linux-users is OK. please help if possible. Thanks, -- On Wed, 21 Nov 2007 10:43:49 +0900 Tomoyoshi ASANO <[EMAIL PROTECTED]> wrote: > Hell, > > This is very nice! > > I tested using glibc-2.5 > It seems good. > > Thank you > > On Wed, 21 Nov 2007 09:24:41 +0900 > "Magnus Damm" <[EMAIL PROTECTED]> wrote: > > > Hi there, > > > > On Nov 20, 2007 11:48 PM, <[EMAIL PROTECTED]> wrote: > > > I found 6th arg for syscall is missing on SH4 linux-user emulation. > > > This seems to be the cause of shared library mapping failure. > > > I successfully run shared-lib'd binary, after applying following fix. > > > > Hehe, I managed to create the exact same patch yesterday evening. So > > this email is just to acknowledge this fix. Dynamically linked > > binaries using uclibc-0.9.29 or glibc-2.3.6 both work well. Thank you. > > > > / magnus > > > qemu-snapshot-sh4eb.patch Description: Binary data
Re: [Qemu-devel] [PATCH] SH4 Fix missing 6th arg of syscall.
Hell, This is very nice! I tested using glibc-2.5 It seems good. Thank you On Wed, 21 Nov 2007 09:24:41 +0900 "Magnus Damm" <[EMAIL PROTECTED]> wrote: > Hi there, > > On Nov 20, 2007 11:48 PM, <[EMAIL PROTECTED]> wrote: > > I found 6th arg for syscall is missing on SH4 linux-user emulation. > > This seems to be the cause of shared library mapping failure. > > I successfully run shared-lib'd binary, after applying following fix. > > Hehe, I managed to create the exact same patch yesterday evening. So > this email is just to acknowledge this fix. Dynamically linked > binaries using uclibc-0.9.29 or glibc-2.3.6 both work well. Thank you. > > / magnus > -- あさの
Re: [Qemu-devel] [PATCH] SH4 Fix missing 6th arg of syscall.
Hi there, On Nov 20, 2007 11:48 PM, <[EMAIL PROTECTED]> wrote: > I found 6th arg for syscall is missing on SH4 linux-user emulation. > This seems to be the cause of shared library mapping failure. > I successfully run shared-lib'd binary, after applying following fix. Hehe, I managed to create the exact same patch yesterday evening. So this email is just to acknowledge this fix. Dynamically linked binaries using uclibc-0.9.29 or glibc-2.3.6 both work well. Thank you. / magnus
[Qemu-devel] [PATCH] SH4 Fix missing 6th arg of syscall.
Hello, I found 6th arg for syscall is missing on SH4 linux-user emulation. This seems to be the cause of shared library mapping failure. I successfully run shared-lib'd binary, after applying following fix. /yoshii diff -u -r1.155 main.c --- a/linux-user/main.c 17 Nov 2007 01:37:43 - 1.155 +++ b/linux-user/main.c 20 Nov 2007 14:09:59 - @@ -1613,7 +1613,7 @@ env->gregs[6], env->gregs[7], env->gregs[0], - 0); + env->gregs[1]); env->gregs[0] = ret; env->pc += 2; break;