From patchwork Sun Mar 21 13:18:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 12153065 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E414DC433DB for ; Sun, 21 Mar 2021 13:19:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB73061920 for ; Sun, 21 Mar 2021 13:19:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229904AbhCUNSu (ORCPT ); Sun, 21 Mar 2021 09:18:50 -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 Precedence: bulk List-ID: X-Mailing-List: linux-mips@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