On 7/4/07, Thiemo Seufer <[EMAIL PROTECTED]> 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.