[PATCH] MIPS: malta: Set load address for 32bit kernel correctly
From: Jiaxun Yang
Date: Sun Apr 05 2020 - 04:41:04 EST
LLD failed to link vmlinux with 64bit load address for 32bit ELF
while bfd will strip 64bit address into 32bit silently.
To fix LLD build, we should supply a 32bit load address for 32bit
kernel.
Signed-off-by: Jiaxun Yang <jiaxun.yang@xxxxxxxxxxx>
Reviewed-by: Fangrui Song <maskray@xxxxxxxxxx>
Tested-by: Nathan Chancellor <natechancellor@xxxxxxxxx>
---
arch/mips/mti-malta/Platform | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/mips/mti-malta/Platform b/arch/mips/mti-malta/Platform
index 2cc72c9b38e3..f9b49cba1764 100644
--- a/arch/mips/mti-malta/Platform
+++ b/arch/mips/mti-malta/Platform
@@ -6,6 +6,10 @@ cflags-$(CONFIG_MIPS_MALTA) += -I$(srctree)/arch/mips/include/asm/mach-malta
ifdef CONFIG_KVM_GUEST
load-$(CONFIG_MIPS_MALTA) += 0x0000000040100000
else
+ifdef CONFIG_64BIT
load-$(CONFIG_MIPS_MALTA) += 0xffffffff80100000
+else
+ load-$(CONFIG_MIPS_MALTA) += 0x80100000
+endif
endif
all-$(CONFIG_MIPS_MALTA) := $(COMPRESSION_FNAME).bin
--
2.26.0.rc2