From 69c4c683b4388a3dc72230ed7a2682c993e432b1 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Wed, 30 Aug 2017 16:29:59 +0200 Subject: [PATCH] qemu, coreboot, multiboot: Change linking address to 0x9000. It's common for distros to use a defective ld which links at 0x9000. Instead of fighting it, just move link target to 0x9000. --- grub-core/Makefile.core.def | 6 +++--- include/grub/offsets.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/grub-core/Makefile.core.def b/grub-core/Makefile.core.def index 58edf8469..a6dcc6615 100644 --- a/grub-core/Makefile.core.def +++ b/grub-core/Makefile.core.def @@ -68,11 +68,11 @@ kernel = { i386_pc_ldflags = '$(TARGET_IMG_LDFLAGS)'; i386_pc_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000'; i386_qemu_ldflags = '$(TARGET_IMG_LDFLAGS)'; - i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200'; + i386_qemu_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000'; i386_coreboot_ldflags = '$(TARGET_IMG_LDFLAGS)'; - i386_coreboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200'; + i386_coreboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000'; i386_multiboot_ldflags = '$(TARGET_IMG_LDFLAGS)'; - i386_multiboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x8200'; + i386_multiboot_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x9000'; i386_ieee1275_ldflags = '$(TARGET_IMG_LDFLAGS)'; i386_ieee1275_ldflags = '$(TARGET_IMG_BASE_LDOPT),0x10000'; i386_xen_ldflags = '$(TARGET_IMG_LDFLAGS)'; diff --git a/include/grub/offsets.h b/include/grub/offsets.h index bf0689fc9..330e4c707 100644 --- a/include/grub/offsets.h +++ b/include/grub/offsets.h @@ -50,7 +50,7 @@ /* The offset of GRUB_CORE_ENTRY_ADDR. */ #define GRUB_KERNEL_I386_QEMU_CORE_ENTRY_ADDR 0x8 -#define GRUB_KERNEL_I386_QEMU_LINK_ADDR 0x8200 +#define GRUB_KERNEL_I386_QEMU_LINK_ADDR 0x9000 /* The offset of GRUB_TOTAL_MODULE_SIZE. */ #define GRUB_KERNEL_SPARC64_IEEE1275_TOTAL_MODULE_SIZE 0x8 @@ -91,7 +91,7 @@ #define GRUB_KERNEL_MIPS_ARC_TOTAL_MODULE_SIZE 0x08 -#define GRUB_KERNEL_I386_COREBOOT_LINK_ADDR 0x8200 +#define GRUB_KERNEL_I386_COREBOOT_LINK_ADDR 0x9000 #define GRUB_KERNEL_I386_COREBOOT_MODULES_ADDR 0x100000 #define GRUB_KERNEL_I386_IEEE1275_LINK_ADDR 0x10000