Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1C3XJl-0000mz-KR for qemu-devel@nongnu.org; Sat, 04 Sep 2004 05:58:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1C3XJk-0000m6-Gq for qemu-devel@nongnu.org; Sat, 04 Sep 2004 05:58:45 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1C3XJk-0000lu-CX for qemu-devel@nongnu.org; Sat, 04 Sep 2004 05:58:44 -0400 Received: from [212.238.201.82] (helo=xi.wantstofly.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1C3XEa-0003Uy-Bn for qemu-devel@nongnu.org; Sat, 04 Sep 2004 05:53:24 -0400 Date: Sat, 4 Sep 2004 11:53:23 +0200 From: Lennert Buytenhek Message-ID: <20040904095323.GA778@xi.wantstofly.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [Qemu-devel] problems with emulating native ARM gcc 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 Hi, After setting up binfmt_misc properly, I can now chroot into an ARM chroot and run most of the binaries in there, apart from things like mount, for which the corresponding system calls are not implemented. (And uname is not emulated at all:) bash-2.05b# uname -a Linux phi.wantstofly.org 2.6.8-1.521smp #1 SMP Mon Aug 16 09:25:06 EDT 2004 i686 unknown bash-2.05b# file /bin/uname /bin/uname: ELF 32-bit LSB executable, ARM, version 1 (ARM), dynamically linked (uses shared libs), stripped bash-2.05b# The problem I'm facing right now is that running bigger applications isn't exactly stable. Trying to compile a simple hello world program using a native ARM gcc compiler, it works maybe one in five or six times or so. bash-2.05b# cat x.c #include int main() { printf("hello, world!\n"); return 0; } bash-2.05b# gcc -Wall -o x x.c qemu: uncaught target signal 11 (Segmentation fault) - exiting collect2: ld returned 245 exit status bash-2.05b# gcc -Wall -o x x.c /bin/../lib/gcc-lib/arm-unknown-linux-gnu/3.3.3/cc1: error while loading shared libraries: /lib/libc.so.6: undefined symbol: __libc_malloc, version GLIBC_2.0 bash-2.05b# gcc -Wall -o x x.c qemu: uncaught target signal 11 (Segmentation fault) - exiting bash-2.05b# gcc -Wall -o x x.c /bin/../lib/gcc-lib/arm-unknown-linux-gnu/3.3.3/cc1: error while loading shared libraries: /lib/libc.so.6: undefined symbol: __libc_malloc, version GLIBC_2.0 bash-2.05b# gcc -Wall -o x x.c bash-2.05b# ./x hello, world! bash-2.05b# Everything in the chroot is compiled with an arm-unknown-linux-gnu toolchain, no v5te stuff in there. cheers, Lennert