From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPXAl-0006Ay-AT for qemu-devel@nongnu.org; Wed, 21 Jan 2009 02:06:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPXAj-0006Ac-2i for qemu-devel@nongnu.org; Wed, 21 Jan 2009 02:06:45 -0500 Received: from [199.232.76.173] (port=42359 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPXAi-0006AY-TG for qemu-devel@nongnu.org; Wed, 21 Jan 2009 02:06:44 -0500 Received: from fg-out-1718.google.com ([72.14.220.152]:22342) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LPXAi-00024U-Do for qemu-devel@nongnu.org; Wed, 21 Jan 2009 02:06:44 -0500 Received: by fg-out-1718.google.com with SMTP id 19so1746608fgg.8 for ; Tue, 20 Jan 2009 23:06:42 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <200901210540.58796.paul@codesourcery.com> References: <761ea48b0901201223q628928e7qe586c42e147a7b6c@mail.gmail.com> <200901210540.58796.paul@codesourcery.com> Date: Wed, 21 Jan 2009 08:06:42 +0100 Message-ID: <761ea48b0901202306v17231be3r609a873d87e1cae4@mail.gmail.com> Subject: Re: [Qemu-devel] User mode issue for loading 32-bit ELF on 64-bit guest processor From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: qemu-devel@nongnu.org On Wed, Jan 21, 2009 at 6:40 AM, Paul Brook wrote: >> Blue Swirl proposed to use accessors for these structures >> while I proposed to use a new abi_ulong-like type that would >> be the same no matter whether TARGET_ABI32 is defined or >> not. As I am not sure there aren't some other structures that >> would need such a type, I think my proposal is less intrusive. >> The drawback is that it would introduce a new type and we >> already have many such *_ulong types :-) > > I'm confused. Isn't this either target_ulong or abi_ulong? > I don't see what other possibilities there are. Indeed these *_ulong types can be confusing especially in that case where elfload32.c sets TARGET_ABI32 before including elfload.c which includes qemu.h and then qemu-types.h which looks like this: #ifdef TARGET_ABI32 typedef uint32_t abi_ulong; #else typedef target_ulong abi_ulong; #endif and then qemu.h defines the structures that cause trouble. Laurent