qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] RFC: fix run of 32 bits Linux executables on 64 bits ta


From: J. Mayer
Subject: Re: [Qemu-devel] RFC: fix run of 32 bits Linux executables on 64 bits targets
Date: Wed, 10 Oct 2007 20:42:16 +0200

On Wed, 2007-10-10 at 19:01 +0300, Blue Swirl wrote:
> On 10/10/07, J. Mayer <address@hidden> 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.

Well, it is overriden just before the create_elf_table call... And it's
especially needed there and in the start_thread code, at least for
PowerPC. As the kernel set it up at this point, it seems to be a good
idea to do the same !

> > 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.

I realized there are tons of unneeded checks/code in my patch, as this
code is compiled twice. I will repost a cleaned one soon...

-- 
J. Mayer <address@hidden>
Never organized





reply via email to

[Prev in Thread] Current Thread [Next in Thread]