Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3376494pxf; Mon, 22 Mar 2021 05:08:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIyMQTN6D05uWrZI7FX1aYekxfCcUFcFH2cJQq3DE4/fw1AtDIEiRZ7lYe0m8q0Ux77bt1 X-Received: by 2002:a17:906:2b46:: with SMTP id b6mr18752183ejg.521.1616414922577; Mon, 22 Mar 2021 05:08:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616414922; cv=none; d=google.com; s=arc-20160816; b=SfhQDxLL5wxRzGPHGtUISDhTxMZmD91ijjBRMlu3RUo7BzZgtsYU/nKKtUQk8p4boz LBLBnKqRNxS+JGqqaI/DjTg1AyMCeHKLCrX4gLNwS0++Soni7XYDsyTSGWZ3Ho7E8NXX qfog0Zz/7MxFj/bAP3X1l0BU9ZXs2n+dwdx0T1hV4JJme0PJ2nfcGMz5mAeGS9iKfPxM gBrUBzkXNHtRDoMxqNrzLhGXXQtzWhCFJmnaeqKML99eFZtuVxHYIQZz72zF9whjtQ+P +WWWQJpQtr4LzdtREve1WWFOZ1iQZ05R1O3NMct4wbv0+Qotm3B9cs8j/MURnUQi1DQ1 pePQ== 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 :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=AFgCbLguriV3CwFF1nhSPTfmyyoAQpRcEnd0zBssKuA=; b=XSb7hTlhKAkc0TEV6Tz8j0Ov7oeA3T7aO9qc9XRktjLun/waAyetLLRpPN+dx9jI/q ithK6z+JcSppqnECa8c7z6Nv/gpo2jKRyGVEmhx1o8qNmhTmtxZJ/lB6ZrQ6W/9WEV67 bIUK9/NfJhXu04dUxsFuzvgTdb+PjTCwlXNds2PtiAHJFYC2stPtn2VSrBedc+IbmAT8 FgaQyfjtcbH1180AciY66S0svgbtTIfQnZhSbMsVryAvpIdmVrBmQlon83pvQ4pOA46m ZpK8LQlhCY354Oq/zyTbPNRIZIPIdeMoA8UJn9WGtt9o6aHATQk3Iq8OIBTkS+w+i7lS EoCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=R2bsUqhA; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p17si11262653edq.209.2021.03.22.05.08.18; Mon, 22 Mar 2021 05:08:42 -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; dkim=pass header.i=@pm.me header.s=protonmail header.b=R2bsUqhA; 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=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230253AbhCVMFE (ORCPT + 99 others); Mon, 22 Mar 2021 08:05:04 -0400 Received: from mail2.protonmail.ch ([185.70.40.22]:31664 "EHLO mail2.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230366AbhCVMEx (ORCPT ); Mon, 22 Mar 2021 08:04:53 -0400 Date: Mon, 22 Mar 2021 12:04:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1616414690; bh=AFgCbLguriV3CwFF1nhSPTfmyyoAQpRcEnd0zBssKuA=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=R2bsUqhAg7Fb96oKF1Og1ulpJbeTnxg9Y4uLtwnit83vvh+9uG8Nj3KGjQyjUaZLT ikLY5u/4aOVlDvfJARcJxogpArdlynErRRX8V5/fp561LEUK8LeB2dn8E7MAR0hxsS xBwLtBEqYJ508r6yD5t1DYRVXjGprSBF/Yqt/KZ7zEywTVG/GMbC9+ATTmQ7/uNtHA eFC7xLk5UUIO/0GHIFgmbR8smuGILktzsL545NR2h+78m1pQfSabQ1CF/oWLuDRP2K ETKrOCCrmL8qkf/qeRziA0e8cL0VbN1Da+8EyJpoGAglypHPZAjhog9mXW+FumsQDE k+5sAKgbGuR4w== To: Paul Cercueil From: Alexander Lobakin Cc: Alexander Lobakin , Paul Burton , Thomas Bogendoerfer , Nathan Chancellor , Nick Desaulniers , od@zcrc.me, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Reply-To: Alexander Lobakin Subject: [PATCH] MIPS: generic: Support linking with LLVM ld.lld Message-ID: <20210322120429.3706-1-alobakin@pm.me> In-Reply-To: <20210321131805.98422-1-paul@crapouillou.net> References: <20210321131805.98422-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Paul Cercueil Date: Sun, 21 Mar 2021 13:18:05 +0000 > 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)=09+=3D -I$(srctree)/arch/mips/include/= asm/mach-ingenic > cflags-$(CONFIG_MIPS_GENERIC)=09+=3D -I$(srctree)/arch/mips/include/asm/= mach-generic > > -load-$(CONFIG_MIPS_GENERIC)=09+=3D 0xffffffff80100000 > -zload-$(CONFIG_MIPS_GENERIC)=09+=3D 0xffffffff81000000 > +load-$(CONFIG_MIPS_GENERIC)=09=09+=3D $(if $(CONFIG_LD_IS_LLD),0x8010000= 0,0xffffffff80100000) > +zload-$(CONFIG_MIPS_GENERIC)=09+=3D $(if $(CONFIG_LD_IS_LLD),0x81000000,= 0xffffffff81000000) > all-$(CONFIG_MIPS_GENERIC)=09:=3D vmlinux.gz.itb For load-y, it's handled in arch/mips/Makefile:289 arch-wide. For zload-y, it's not handled at all, but the proper way to do this is to add a similar to load-ld logics in arch/mips/boot/compressed/Makefile. > its-y=09=09=09=09=09:=3D vmlinux.its.S > -- > 2.30.2 Thanks, Al