lkml.org 
[lkml]   [2021]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] MIPS: generic: Support linking with LLVM ld.lld
Date
LLVM's ld.lld chokes on the 64-bit sign-extended load addresses. Use
32-bit addresses if the linker is LLVM's ld.lld.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
arch/mips/generic/Platform | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/generic/Platform b/arch/mips/generic/Platform
index b871af16b5b6..19b7d92a4ca7 100644
--- a/arch/mips/generic/Platform
+++ b/arch/mips/generic/Platform
@@ -12,8 +12,8 @@
cflags-$(CONFIG_MACH_INGENIC_SOC) += -I$(srctree)/arch/mips/include/asm/mach-ingenic
cflags-$(CONFIG_MIPS_GENERIC) += -I$(srctree)/arch/mips/include/asm/mach-generic

-load-$(CONFIG_MIPS_GENERIC) += 0xffffffff80100000
-zload-$(CONFIG_MIPS_GENERIC) += 0xffffffff81000000
+load-$(CONFIG_MIPS_GENERIC) += $(if $(CONFIG_LD_IS_LLD),0x80100000,0xffffffff80100000)
+zload-$(CONFIG_MIPS_GENERIC) += $(if $(CONFIG_LD_IS_LLD),0x81000000,0xffffffff81000000)
all-$(CONFIG_MIPS_GENERIC) := vmlinux.gz.itb

its-y := vmlinux.its.S
--
2.30.2
\
 
 \ /
  Last update: 2021-03-21 14:20    [W:0.053 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site