qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] qemu and modern glibc


From: Alexander E. Patrakov
Subject: [Qemu-devel] qemu and modern glibc
Date: Sun, 23 May 2004 10:17:41 +0600
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040121

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]