From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FpnFk-0000H4-KL for qemu-devel@nongnu.org; Mon, 12 Jun 2006 10:18:52 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FpnFi-0000G6-Jz for qemu-devel@nongnu.org; Mon, 12 Jun 2006 10:18:52 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FpnFi-0000Fw-BP for qemu-devel@nongnu.org; Mon, 12 Jun 2006 10:18:50 -0400 Received: from [65.74.133.4] (helo=mail.codesourcery.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.52) id 1FpnOR-0002oB-Tq for qemu-devel@nongnu.org; Mon, 12 Jun 2006 10:27:52 -0400 From: Paul Brook Subject: Re: [Qemu-devel] qemu qemu-doc.texi Date: Mon, 12 Jun 2006 15:18:34 +0100 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606121518.35354.paul@codesourcery.com> 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: Wolfgang Schildbach On Monday 12 June 2006 15:09, Wolfgang Schildbach wrote: > Hi Paul, > > Does this mean that qemu-arm should be able to run the binaries that are > produced by RVCT? I am trying to run a simple helloworld, compiled and > linked with rvct2.2 (armcc -g -o hello hello.c) into a "ELF 32-bit LSB > executable, ARM, version 1 (SYSV), statically linked, not stripped" file, > but qemu-arm fails with an "error loading ./hello". Yes it should be able to run RVCT binaries. The problem is that the qemu loader assumes the LMA and file offsets be page aligned (ie. be the same modulo the page size). This is part of the ABI for linux executables so that the binary can be mmapped directly into memory. RVCT does not enforce this alignment by default. > On a related note, how do I go about debugging qemu (namely the part that > loads executables)? Since qemu appears as a shared object, this is not so > straightforward. When I start gdb on arm-user, set a breakpoint at main() > and type "run", I get Configure with --static. Paul