Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2396373imn; Tue, 2 Aug 2022 00:48:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1swA+9Ji9QvGvX7k2AvlMSPISUuZ75BU24ZKC18MEgKoIe9FEyoImUstcvRfcHzYDfoKHRf X-Received: by 2002:a63:6886:0:b0:415:b629:3210 with SMTP id d128-20020a636886000000b00415b6293210mr15915216pgc.129.1659426482853; Tue, 02 Aug 2022 00:48:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659426482; cv=none; d=google.com; s=arc-20160816; b=cA6WB2DaLc5kOSoandsQO7kwuoxJDVskY9sPIqmtNOa8d4GuP5iL227GXGY6LWBbPl w2G2iLgOxF7WOZTLwev/D1ZTdBZdQQShDOn1DDE1ep6Rgp+7sGsKiL6FSzreXD+ceXXo pINy/oXY6/H9zqNqRaekJ4cyBTpEKk64zp9uSTFSBn43CGQ8jrtSYz9aCsRVVJ0tWnas MQMv+PVZi5+n8zJpk/3yrc0rO8WgImXdSu49QqTYxwshl2MWIZGsMP5FUXdvrmsxk6qo y358oKhn8mi0mBYBhpEwizjhoQZeL71ICu2etr4P9BV+NQYHR5+f9tClkuD7QJFqtgCc zPJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=CCZ0GJKoe0GQbfJb4bpVRxOSZJEDpW/fK7TLprgjmOg=; b=aY2b1AhyrTxaYogd2e8nh1r9Z3zRUS/fvn+wz9EfZXTF8akEJ6wnWiI5mB9lBk6XqY 4DtRrNl09q3jdO9gzRLPQJ85e4a0IbbBuwRQ26wpmBmjqrApm9nCd/yNLaO6l6CuS0h0 Czz9B6W8dgrhhK8WriSH2GYWAiiDYwJbiwEToYL1fWighWKrEdnoG0NyPgMbYME/B6xt yFuo80wfi5ALiitKkUIC5FGXxYT/ENiRsB8vsAV5oAROM7Z5QXwQTfnTYEJQw6NmX8jf rbgTX6kOhjAiBQDe/ldyYNnIC/Mzn8geYVoGq3hkAmqCnjDzOEXgqpMYgt8tFqlEUpaD T7Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b="E4o/TRhE"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o2-20020a63e342000000b0040d28f1a116si14246105pgj.328.2022.08.02.00.47.49; Tue, 02 Aug 2022 00:48:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b="E4o/TRhE"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235841AbiHBHP7 (ORCPT + 99 others); Tue, 2 Aug 2022 03:15:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235785AbiHBHPy (ORCPT ); Tue, 2 Aug 2022 03:15:54 -0400 Received: from xry111.site (xry111.site [89.208.246.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 351903C8E9 for ; Tue, 2 Aug 2022 00:15:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1659424549; bh=9mfP6cIoYYdCa9fAZu+VoJwSH12XRoY1LZsv7VhawqM=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=E4o/TRhEf+SQtd2hrZg09OXjnDP28ozd1+RkjNuZzQa57YlVjTCkSdu8ieswHvGKF bAWDzd9o4k0Yl2B8z1BIA/hbUq4fQc+z06dScctuQSmx02UXjRyIbTN1NMUmezSrip D+bPRaAYooqBfhld4gImQNiva6N2J6VCeRVVOK0k= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id E0DB666A90; Tue, 2 Aug 2022 03:15:47 -0400 (EDT) Message-ID: <8fd0864c3f7f3ca53db4c663215f757993ee1596.camel@xry111.site> Subject: Re: [PATCH v4 0/4] LoongArch: Support new relocation types From: Xi Ruoyao To: Lulu Cheng , Youling Tang , Huacai Chen Cc: Jinyang He , loongarch@lists.linux.dev, LKML , WANG Xuerui Date: Tue, 02 Aug 2022 15:15:45 +0800 In-Reply-To: <98efbf76-fbf3-f90b-82d4-bd2874088d05@loongson.cn> References: <32a74a218c76611f897fd1df1ad0059068621133.camel@xry111.site> <0179679b736aea7258981dec2d83107cce74dfc1.camel@xry111.site> <6b5d2188f93ed72b67a4bbb7116113f833fe1ee5.camel@xry111.site> <7cad6e78014168a8906e130e1cf3809077d2bda7.camel@xry111.site> <1d0783b87bda3e454a111862fcc5b5faffcb16b0.camel@xry111.site> <00eede4b1380888a500f74b1e818bb25a550632b.camel@xry111.site> <7512ae16-b171-d072-674f-a6b9a5e764d6@loongson.cn> <10751c9af5d45fea741e0bbed6c818ddb9db3ac3.camel@xry111.site> <7b1f9813-85fc-acfd-8e24-7e01469ded3a@loongson.cn> <3c724516-50eb-cd34-5e4f-399c53a89ee4@loongson.cn> <98efbf76-fbf3-f90b-82d4-bd2874088d05@loongson.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.44.3 MIME-Version: 1.0 X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, PDS_OTHER_BAD_TLD,SPF_HELO_PASS,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2022-08-02 at 14:39 +0800, Lulu Cheng wrote: > >=20 > > =C2=A0OO, old toolchains require extra handlingg no matter how modified= .=20 > > =C2=A0Maybe rejecting old toolchain builds is a good option as Huacai > > said.=20 > Sorry to ask, is it possible to use an absolute address to visit here? > Like precpu, do not use pcrel or got, and it directly uses > four instructions to obtain the absolute address. > The same is achieved by adding attributes in GCC. Both GOT and ABS will work. But to me GOT is better because it only needs two instructions while ABS needs four. The most troubling issue is how to support the old GCC. It seems we have to check GCC version and use -Wa,-mla-local-with-pcrel for GCC 12 (while I still think GOT is better but we don't have -mla-local-with- got, *and* it will cause make every local object address load cost 4 instructions), or we just say "it's impossible to use GCC 12 to build Linux 6.0 for LoongArch". --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University