Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2770834pxf; Sun, 21 Mar 2021 06:20:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydm80yEkk1vnXTK301dLl1kdrnuAXLC7D+Wc8MFtBaSTtgxxsNFi9FKZxRQTAeoa8D4BUj X-Received: by 2002:a05:6402:2744:: with SMTP id z4mr20676501edd.347.1616332822404; Sun, 21 Mar 2021 06:20:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616332822; cv=none; d=google.com; s=arc-20160816; b=nHJacYaK0m6Xcw1uWSLCARtT14gztlaU1K6rVcrCciYf8g4tVGtbynV72yNkMbnKmE Al5dmH3SLoFyOOMlkfK3cwQj18bkRxAuB3lqx3gDZZuVADoRGBcLIm+Emj9vK8LjF0Zo xmDwtJbKToCKHB0fB2V/VkcSy4uURQd0lBWzSNjLWQ7p8Lg+AK0dIHfREhPZYvRQnCDN XgqDtrMmsL86gnIMFHm7cn4WOMquJ8Q3KvMdil8r1I3uktW+wMF7zT30XGYiC6rpZXNS 9BBE49enr5bKIuaovJRW2Ao0zmLCzFIuERdmBgX9rRAX7DVLaQEaEploOAjpa9CgjRJ2 apzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7+uLdWJl6+YfycjLcsztKfTEnnJ2uRAbJbjIr0P8wiU=; b=H0ul1d9ltjD5arUqpKR/UV0FeFzG7AK0bXvMbE4L+nJkj5iIlo8/ZQQCcSD4bCJDRb ADOdRcNcivUQAUGmg5+y0ZQ0t4GCqChEvsujvgdIAxMwayF7wOwmFHHI3LXECaXxVHQL I7uZKYGpB4NGztkzsCyiAL3t3740t57b86sIXw9JaFuevsuW8LhTJHCjfpIK8DaKwHZx 3x8rCy1t4JS57Raf9n66YCvi5RiUs5t+jxW+VfasExrMqCp4eDE4DwYynHaf68YE0lr4 jhi2KxjxaTYgBo4NTMgDju6tq5SiMoVT7L5wEv0PWHiEi5gDnW1AALdWK44s7NXE2ef2 mm2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si8457716edd.8.2021.03.21.06.20.00; Sun, 21 Mar 2021 06:20:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229912AbhCUNSv (ORCPT + 99 others); Sun, 21 Mar 2021 09:18:51 -0400 Received: from aposti.net ([89.234.176.197]:38258 "EHLO aposti.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229874AbhCUNSj (ORCPT ); Sun, 21 Mar 2021 09:18:39 -0400 From: Paul Cercueil To: Paul Burton , Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers Cc: od@zcrc.me, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Paul Cercueil Subject: [PATCH] MIPS: generic: Support linking with LLVM ld.lld Date: Sun, 21 Mar 2021 13:18:05 +0000 Message-Id: <20210321131805.98422-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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