It seems to me that there are many problems in linux-user/syscall.c - minor fixes, just to avoid compilation warnings: do_socketcall should be inside a #ifdef TARGET_NR_socketcall block do_ipc should be inside a #ifdef TARGET_NR_ipc block - problems for 64 bits targets: it seems that do_syscall and child functions should take target_long / target_ulong arguments instead of long / unsigned long. This would make a chance for 64 bits targets to be ran on 32 bits hosts (even if, yes, there would also be other problems to fix elsewhere...). - ipc specific problems: some structure used for IPC definitions have been merged. They used to be target specific and now are generic. But it seems to me that many mistakes have been done here, while comparing with the PowerPC 64 target definition, which has not been merged: struct target_ipc_perm { int __key; unsigned short uid; unsigned short gid; unsigned short cuid; unsigned short cgid; unsigned short mode; unsigned short seq; }; in PowerPC 64 becomes: struct target_ipc_perm { target_long __key; target_ulong uid; target_ulong gid; target_ulong cuid; target_ulong cgid; unsigned short int mode; unsigned short int __pad1; unsigned short int __seq; unsigned short int __pad2; target_ulong __unused1; target_ulong __unused2; }; in generic code. Problems are, imho: int is not the same size than target_long on 64 bits targets. unsigned short is never the same size than target_ulong (am I wrong ?) there should be a target_short definition: are we sure short on the host is always the same size than target_short ? I also don't understand the padding logic here (does the original target_ipc_perm structure relies on alignments generated by the compiler ?). I found the same kind of problems for the target_msqid_ds and target_msgbuf structure. I may be wrong, but it seems to me that those problems are not PowerPC 64 specific and that there are some serious bugs to be fixed here. Can someone confirm this or tell me what I missed ?
Regards. -- J. Mayer <[EMAIL PROTECTED]> Never organized