From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LiBF0-0000ui-Tf for qemu-devel@nongnu.org; Fri, 13 Mar 2009 13:32:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LiBEw-0000qx-CJ for qemu-devel@nongnu.org; Fri, 13 Mar 2009 13:32:14 -0400 Received: from [199.232.76.173] (port=57437 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LiBEw-0000qh-4I for qemu-devel@nongnu.org; Fri, 13 Mar 2009 13:32:10 -0400 Received: from mail-bw0-f162.google.com ([209.85.218.162]:43828) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LiBEv-0004rj-HR for qemu-devel@nongnu.org; Fri, 13 Mar 2009 13:32:09 -0400 Received: by bwz6 with SMTP id 6so213810bwz.34 for ; Fri, 13 Mar 2009 10:32:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <278E7B05-94BB-41D0-9F2B-EEE35B9D8DD2@csgraf.de> References: <1235833386-30272-1-git-send-email-agraf@suse.de> <278E7B05-94BB-41D0-9F2B-EEE35B9D8DD2@csgraf.de> Date: Fri, 13 Mar 2009 19:32:04 +0200 Message-ID: Subject: Re: [Qemu-devel] [PATCH] Make the ELF loader aware of backwards compatibility From: Blue Swirl Content-Type: text/plain; charset=UTF-8 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: Alexander Graf Cc: qemu-devel@nongnu.org On 3/12/09, Alexander Graf wrote: > > On 28.02.2009, at 16:30, Blue Swirl wrote: > > > > On 2/28/09, Alexander Graf wrote: > > > > > Most 64 bit architectures I'm aware of support running 32 bit code > > > of the same architecture as well. > > > > > > > For Sparc64 this is only true for userland, kernel level code is not > > compatible at all. Sparc64 kernel can run Sparc64 and Sparc32 > > binaries, but a Sparc32 kernel will crash on Sparc64. > > > > > > > /* Load a 32 bit BIOS also on 64 bit machines */ > > > -#if defined (TARGET_PPC64) && defined(CONFIG_USER_ONLY) > > > +#if defined (TARGET_PPC64) > > > #define ELF_MACHINE EM_PPC64 > > > #else > > > #define ELF_MACHINE EM_PPC > > > > > > > The comment should be removed with the hack. > > > > I agree. > > Any functional issues with this patch? -kernel for ppc64 still doesn't work > with current SVN :-). The elf_check_arch macro that linux-user uses could be cleaner approach. But this is OK as the first step, so I'll commit this shortly.