|
From: | Alexander Graf |
Subject: | Re: [Qemu-devel] [PATCH] Add multi-boot kernel loading support |
Date: | Tue, 3 Feb 2009 12:12:19 +0100 |
On 03.02.2009, at 11:53, Jamie Lokier wrote:
Alexander Graf wrote:--- elf_ops.h (revision 6501) +++ elf_ops.h (working copy) @@ -195,6 +195,10 @@ } if (ELF_MACHINE != ehdr.e_machine) +#if (ELF_MACHINE == EM_X86_64) && !defined(CONFIG_USER_ONLY) + /* x86_64 systems can run i386 code as well */ + if(ehdr.e_machine != EM_386) +#endif goto fail; if (pentry)Seems like an unrelated fix.Actually it's not. If you want to load a 32-bit elf (multiboot) executable on an x86_64 system, you need this patch.Why CONFIG_USER_ONLY? Does it mean qemu-x86_64 (the user one) will behave differently given a 32-bit ELF file if you built qemu-system-x86_64 at the same time?
It's !defined(), to ensure the userspace emulation behavior doesn't change. Right now, loading an i386 binary with qemu-x86_64 does not work - and I don't want to change that for now.
AFAIK CONFIG_USER_ONLY is defined when building qemu-x86_64, but not when building qemu-system-x86_64.
Alex
[Prev in Thread] | Current Thread | [Next in Thread] |