qemu-e2k/target-ppc
blueswir1 7f70c93716 Make the ELF loader aware of backwards compatibility
Most 64 bit architectures I'm aware of support running 32 bit code
of the same architecture as well.

So x86_64 can run i386 code easily and ppc64 can run ppc code.

Unfortunately, the current checks are pretty strict. So you can only
load e.g. an x86_64 elf binary on qemu-system-x86_64, but no i386 one.

This can get really annoying. I first encountered this issue with
my multiboot patch, where qemu-system-x86_64 was unable to load an
i386 elf binary because the elf loader rejected it.

The same thing happened again on PPC64 now. The firmware we're loading
is a PPC32 elf binary, as it's shared with PPC32. But the platform is
PPC64.

Right now there is a hack for this in the ppc cpu.h definition, that
simply sets the type to PPC32 in system emulation mode. While that
works fine for the firmware, it's no good if you also want to load a
PPC64 kernel with -kernel.

So in order to solve this mess, I figured the easiest way is to make
the elf loader aware of platforms that are backwards compatible. For
now I was only sure that x86_64 does i386 and ppc64 does ppc32, but
maybe there are other combinations too.

This patch is a prerequisite for having a working -kernel option on
PPC64.

Signed-off-by: Alexander Graf <alex@csgraf.de>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6855 c046a42c-6fe2-441c-8c8c-71466251a162
2009-03-13 21:16:24 +00:00
..
cpu.h Make the ELF loader aware of backwards compatibility 2009-03-13 21:16:24 +00:00
exec.h Update FSF address in GPL/LGPL boilerplate 2009-01-04 22:05:52 +00:00
helper_regs.h Update FSF address in GPL/LGPL boilerplate 2009-01-04 22:05:52 +00:00
helper.c Disable BAT for 970 2009-03-07 20:58:30 +00:00
helper.h targe-ppc: optimize mfcr and mtcrf 2009-03-09 18:50:24 +00:00
kvm_ppc.c targets: remove error handling from qemu_malloc() callers (Avi Kivity) 2009-02-05 22:06:11 +00:00
kvm_ppc.h kvm/powerpc: extern one function for MPC85xx code use 2009-01-24 16:35:56 +00:00
kvm.c
machine.c kvm/powerpc: Add MPC8544DS board support 2009-03-02 16:42:42 +00:00
mfrom_table_gen.c
mfrom_table.c
op_helper.c targe-ppc: optimize mfcr and mtcrf 2009-03-09 18:50:24 +00:00
STATUS
translate_init.c target-ppc: fix commit r6789 2009-03-10 19:37:28 +00:00
translate.c target-ppc: use the new bswap* TCG ops 2009-03-13 09:35:34 +00:00