On Wed, 2007-10-10 at 19:01 +0300, Blue Swirl wrote: > On 10/10/07, J. Mayer <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> Never organized