From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1I6Z9T-0003IN-Ua for qemu-devel@nongnu.org; Thu, 05 Jul 2007 17:46:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1I6Z9T-0003Hy-KN for qemu-devel@nongnu.org; Thu, 05 Jul 2007 17:46:15 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1I6Z9T-0003Hr-CI for qemu-devel@nongnu.org; Thu, 05 Jul 2007 17:46:15 -0400 Received: from wr-out-0506.google.com ([64.233.184.235]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1I6Z9T-0002ME-0h for qemu-devel@nongnu.org; Thu, 05 Jul 2007 17:46:15 -0400 Received: by wr-out-0506.google.com with SMTP id 71so43587wri for ; Thu, 05 Jul 2007 14:46:14 -0700 (PDT) Message-ID: Date: Fri, 6 Jul 2007 00:46:12 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] qemu/linux-user elfload.c In-Reply-To: <20070704204850.GC1209@networkno.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070704204850.GC1209@networkno.de> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thiemo Seufer Cc: qemu-devel@nongnu.org On 7/4/07, Thiemo Seufer wrote: > Blue Swirl wrote: > > Modified files: > > linux-user : elfload.c > I think this will break loading of 32bit kernels in a 64bit capable > Qemu (like MIPS64). Could you make the test of ELFCLASS a runtime > check? The ELF loader is different for system emulator (loader.c and elf_ops.h vs. elfload.c) (why?), this patch was for linux-user. It's not possible to load 32 bit files with a 64 bit user emulator currently. For Sparc that might be useful as there is a hybrid ELF format used by Solaris, where the file is 32 bits but the CPU is 64 bits. The same 64 to 32 bit symbol conversion happens on system emulator side already. ELF class selects the correct version of elf_ops (loader.c:232), therefore either word size is OK.