Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KDPTf-0006fg-8P for qemu-devel@nongnu.org; Mon, 30 Jun 2008 15:55:55 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KDPTd-0006fU-Ug for qemu-devel@nongnu.org; Mon, 30 Jun 2008 15:55:54 -0400 Received: from [199.232.76.173] (port=39703 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KDPTd-0006fR-LD for qemu-devel@nongnu.org; Mon, 30 Jun 2008 15:55:53 -0400 Received: from ms01.sssup.it ([193.205.80.99]:41652 helo=sssup.it) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KDPTd-0004Mn-8H for qemu-devel@nongnu.org; Mon, 30 Jun 2008 15:55:53 -0400 Message-ID: <48693A4D.5020307@gandalf.sssup.it> Date: Mon, 30 Jun 2008 21:55:57 +0200 From: michael MIME-Version: 1.0 References: <1209474608.5892.9.camel@localhost.localdomain> <200804291455.34374.paul@codesourcery.com> In-Reply-To: <200804291455.34374.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: User mode emulation's clone does not seem to work with glibc >= 2.4's fork Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Lubomir Kundrak , paul@codesourcery.com Hi, Paul Brook wrote: > On Tuesday 29 April 2008, Lubomir Kundrak wrote: >> I tried to run SH4 binaries linked with glibc-2.8 with qemu-sh4. fork() >> system call was always returning with "Invalid argument". > > qemu doesn't currently support NPTL. I'm working on it. > > Paul > > > I'm working on sh4 to provide an NPTL support. I just force the NPTL support of sh4 in the configuration and add the cpu_set_tls using the env->gbr. I have sh: ../nptl/sysdeps/unix/sysv/linux/sh/../fork.c:138: __libc_fork: Assertion `(self->tid) != ppid this assertion in tforhe libc code. The child_tidptr is nil, so I can't set the tid for the child. I change the code of the fork like this: #if !defined(TARGET_SH4) ret = get_errno(do_fork(cpu_env, arg1, arg2, arg3, arg4, arg5)); #else ret = get_errno(do_fork(cpu_env, arg1, arg2, arg3, arg5, arg4)); #endif An know seem to work the sh4 target. I think that is not the only change. Is it right? Regards Michael