allow_elf64.patch 956 B

1234567891011121314151617181920212223242526
  1. commit cb61bc8a42da1a971079767e63df4503b6ab2efb
  2. Author: Anatol Pomozov <anatol.pomozov@gmail.com>
  3. Date: Mon Jan 29 10:08:53 2018 -0800
  4. multiboot: Make elf64 loading functionality compatible with GRUB
  5. GRUB is a reference multiboot implementation and supports loading elf64
  6. binaries. Make QEMU to work similar was as GRUB.
  7. diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c
  8. index 5bc0a2cddb..0907e42a39 100644
  9. --- a/hw/i386/multiboot.c
  10. +++ b/hw/i386/multiboot.c
  11. @@ -193,11 +193,6 @@ int load_multiboot(FWCfgState *fw_cfg,
  12. int kernel_size;
  13. fclose(f);
  14. - if (((struct elf64_hdr*)header)->e_machine == EM_X86_64) {
  15. - error_report("Cannot load x86-64 image, give a 32bit one.");
  16. - exit(1);
  17. - }
  18. -
  19. kernel_size = load_elf(kernel_filename, NULL, NULL, &elf_entry,
  20. &elf_low, &elf_high, 0, I386_ELF_MACHINE,
  21. 0, 0);