Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.34) id 1BRl8L-00048w-H5 for qemu-devel@nongnu.org; Sun, 23 May 2004 01:02:49 -0400 Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.34) id 1BRkTY-0005vw-0O for qemu-devel@nongnu.org; Sun, 23 May 2004 00:21:11 -0400 Received: from [194.226.236.116] (helo=ums.usu.ru) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1BRkPi-0005N1-DU for qemu-devel@nongnu.org; Sun, 23 May 2004 00:16:42 -0400 Message-ID: <40B025E5.1020103@ums.usu.ru> Date: Sun, 23 May 2004 10:17:41 +0600 From: "Alexander E. Patrakov" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] qemu and modern glibc 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 The problem is that such a modern distro as Linux From Scratch CVS b6_0 cannot build qemu-fast. I have tracked it down to the following: 1) Modern glibc (a known good CVS snapshot, since there will be no more release tarballs) uses TLS when built with --with-tls --enable-addons=nptl 2) Building two versions of glibc, one with TLS and one without, as Debian and RedHat do, is their custom modification, not supported by glibc developers, and intended only to support old binaries that rely upon old pthreads implementation. LFSers still don't know how to do this, and they don't need this. 3) To build qemu-fast with such a modern glibc, one has to modify the i386-vl.ld ldscript to account for the new .tdata and .tbss sections (supported only by HJL binutils and FSF binutis 2.15 at this moment). Also one has to add -lpthread to the end of $(QEMU_USER) rule in Makefile.target. The lines to insert after .data1 section into the ldscript are: .tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) } .tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) } (copied without understanding from the output of gcc -Wl,--verbose trivial_program.c) After doing all this, I get the qemu-fast binary. But it does not work, just shows the SDL window and then eats 100% of CPU. gdb shows that the program constantly gets SIGSEGV at the same address in code_gen_buffer(). How should I troubleshoot this further? -- Alexander E. Patrakov