qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC, PATCH] Support for loading 32 bit ELF files for 6


From: J. Mayer
Subject: Re: [Qemu-devel] [RFC, PATCH] Support for loading 32 bit ELF files for 64 bit linux-user
Date: Sun, 07 Oct 2007 16:01:56 +0200

On Sun, 2007-10-07 at 15:45 +0300, Blue Swirl wrote:
> Hi,

Hi,

> This patch adds support for loading a 32 bit ELF file in the 64 bit
> user mode emulator. This means that qemu-sparc64 can be used to
> execute 32 bit ELF files containing V9 instructions (SPARC32PLUS).
> This format is used by Solaris/Sparc and maybe by Debian in the
> future.
> 
> Other targets shouldn't be affected, but I have done only compile
> testing. Any comments?

The idea of loading 32 bits executables on 64 bits target seems great.
Then, I got two remarks about this patch:
- it seems that it does not take care about my patch. As I was to commit
it today, I wonder if I still should do it. But then, your patch lacks
some bugifxes (start_data not properly computed and TARGET_LONG_BITS !=
HOST_LONG_BITS problems).
- it seems that quite all the ELF loader code is affected by your patch.
I think (maybe too naively) that adding functions to read the ELF infos
should be sufficient, ie add a read_elf_ehdr, ..., functions and a few
patches in the create_elf_table function. Then, all informations nedded
to load a 32 bits executable can be kept into the 64 bits structures. As
the kernel does not duplicate the code to handle this case, I think Qemu
loader should be kept as simple as the kernel one, and the elfload_ops.h
seems to me to be useless. In fact, Qemu loader could (should ?) even be
the same code than the kernel one with just a few helpers for endianness
swaps and the needed fixes to avoid confusions between host_long and
target_long...

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





reply via email to

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