PKGBUILDs/extra/qemu/allow_elf64.patch

26 lines
956 B
Diff
Raw Normal View History

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