linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: malta: Set load address for 32bit kernel correctly
@ 2020-04-05  8:24 Jiaxun Yang
  2020-04-05 16:47 ` Maciej W. Rozycki
  2020-04-07  8:06 ` [PATCH v2] MIPS: Truncate load-y into 32bit for 32bit kernel Jiaxun Yang
  0 siblings, 2 replies; 14+ messages in thread
From: Jiaxun Yang @ 2020-04-05  8:24 UTC (permalink / raw)
  To: linux-mips
  Cc: Jiaxun Yang, Fangrui Song, Nathan Chancellor,
	Thomas Bogendoerfer, linux-kernel

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@flygoat.com>
Reviewed-by: Fangrui Song <maskray@google.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com>
---
 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



^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-04-10 23:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-05  8:24 [PATCH] MIPS: malta: Set load address for 32bit kernel correctly Jiaxun Yang
2020-04-05 16:47 ` Maciej W. Rozycki
2020-04-05 16:53   ` Jiaxun Yang
2020-04-05 17:23     ` Maciej W. Rozycki
2020-04-06 10:57       ` YunQiang Su
2020-04-06 11:10         ` Jiaxun Yang
2020-04-06 16:43           ` Fangrui Song
2020-04-07  8:06 ` [PATCH v2] MIPS: Truncate load-y into 32bit for 32bit kernel Jiaxun Yang
2020-04-07 17:21   ` Nick Desaulniers
2020-04-07 18:00     ` Fangrui Song
2020-04-07 18:10     ` Maciej W. Rozycki
2020-04-10  9:06   ` [PATCH v3] MIPS: Truncate link address " Jiaxun Yang
2020-04-10 20:45     ` Kees Cook
2020-04-10 23:40       ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).