From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ifdzl-00081j-3v for qemu-devel@nongnu.org; Wed, 10 Oct 2007 12:01:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ifdzj-00080u-B7 for qemu-devel@nongnu.org; Wed, 10 Oct 2007 12:01:12 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ifdzi-00080j-W2 for qemu-devel@nongnu.org; Wed, 10 Oct 2007 12:01:11 -0400 Received: from nf-out-0910.google.com ([64.233.182.187]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Ifdzi-0001Yp-Gv for qemu-devel@nongnu.org; Wed, 10 Oct 2007 12:01:10 -0400 Received: by nf-out-0910.google.com with SMTP id 30so240197nfu for ; Wed, 10 Oct 2007 09:01:09 -0700 (PDT) Message-ID: Date: Wed, 10 Oct 2007 19:01:08 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] RFC: fix run of 32 bits Linux executables on 64 bits targets In-Reply-To: <1192002128.9976.186.camel@rapid> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1192002128.9976.186.camel@rapid> 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 On 10/10/07, J. Mayer wrote: > Following the patches done for elfload32, it appeared to me that there > were still problems that would prevent 32 bits executables to run on 64 > bits target in linux user mode emulation. > First of all, the personality was never set to PER_LINUX32 It's set in elfload32.c, but I think your approach is better. The check for elf_ex->e_ident[EI_CLASS] == ELFCLASS64 could be moved from elfload32.c. > The second problem was that pointers used to set the values on the stack > were still of target_ulong size, which lead 32 bits executable crash > dereferencing NULL pointers as soon as they wanted to parse their > arguments. Nice, I was wondering why my test program crashed.