Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp486551imn; Thu, 28 Jul 2022 06:51:48 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s2nVFvO/ECuV6ghQQpwQeHK/KoyoDPBdwcQBHC2m9EGj9K48EAB7j/mD8nKwzcnlrphoSU X-Received: by 2002:a17:90b:278c:b0:1f2:ec37:52ee with SMTP id pw12-20020a17090b278c00b001f2ec3752eemr10486393pjb.236.1659016308258; Thu, 28 Jul 2022 06:51:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659016308; cv=none; d=google.com; s=arc-20160816; b=Oj433i4rdvKBtvAaDO3c86JntvHeM7/iP6bBjtt82N+lT/vgIlQI6ivPfrPSflPykX UHZZ0YzyEbeGSR9oc1+rUJWGDTFv5mRuoRVEbO7TzwmOxrbLmvhmLzvJXkGi9M6H/27V /DPZFuSJrpy8dmxZsaMYkgo7gSkCMVxQlb49GnhbtnfsM0LMxT4x322A0qTykSLeMTh7 k5weOw4tJqMoKQByWyxsxxQGTgpd8FZxHdgx6ZEyvlclHI3SkqvEeBQm3PFB4AfhrO6I nK1+b+FEFFeFrkOoXuR0JNY6bolkF2lPgAJrgaTMf1CILo+r6qDS/6UT9z23Z173Lp3v SpIQ== 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=Juu02ZcJn3yGeYKa3DGXlIlaVFm0p3PRl9AIGqOpalk=; b=c6OWwbcN2srJEAgJmhIJH4x3GNI82OETvtmq/7GeemeKY1QlO+YAB1pg/xjR8HmRso sepcSX6NALgtVgpe+oysDBTP8z47zFw7psAvKxhirz/YLobQ4qhT9Brry43tbUix1pVB MtoTBNN8Rsq+QCIcZRefNbPQ7sxCqDMwfeR6HcXluuaKvpmZsSuOqu7sxm/2yXzC3PNJ erTbjAM47Los1fgy6Ye5w1h2Hsp9K4VQV0iLNqtLhdSeSRcLOu7yKVs+hOmZ2Cs/PTLu /sdxPkL6BDvidI8rueaPT7GIDvd8NXHLLsfn15iyzeMusQ5dQSifPlHzHzzlVbyIFuoZ bErA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=B4rECBn3; 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 mu6-20020a17090b388600b001f218557a38si1154409pjb.13.2022.07.28.06.51.30; Thu, 28 Jul 2022 06:51:48 -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=B4rECBn3; 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 S239060AbiG1NKp (ORCPT + 99 others); Thu, 28 Jul 2022 09:10:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238962AbiG1NKl (ORCPT ); Thu, 28 Jul 2022 09:10:41 -0400 Received: from xry111.site (xry111.site [89.208.246.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB17E32BBA for ; Thu, 28 Jul 2022 06:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1659013838; bh=i9d4o6t0mhJMAsILy/hKFYjulyc2V0jBY92Uw7RPIbI=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=B4rECBn32cVv0aeGLiUQ6s/l2IZ1gpYKN8JxTAv/PgTjEPHZqGznbe7ggZHZJuLxE 5bPQ9O7LG8n7mWCkPZ3Njl0BMBytp8IZ4gG4SY1ItIn9GqDeqfr6FmlP3Vqs4DmoWR xe2P50xBtMKuLih+Un/Cb0pmNBr4qjfz5qs/4rNw= 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 0037066805; Thu, 28 Jul 2022 09:10:36 -0400 (EDT) Message-ID: <615b5bc79c9e48409361bde1af9374cacb06ec9c.camel@xry111.site> Subject: Re: [PATCH v2 3/4] LoongArch: Stop using undocumented assembler options From: Xi Ruoyao To: Huacai Chen Cc: loongarch@lists.linux.dev, LKML , WANG Xuerui , Youling Tang , Jinyang He Date: Thu, 28 Jul 2022 21:10:34 +0800 In-Reply-To: References: 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.1 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 Thu, 2022-07-28 at 20:25 +0800, Huacai Chen wrote: > Hi, Ruoyao, >=20 > On Thu, Jul 28, 2022 at 8:03 PM Xi Ruoyao wrote: > >=20 > > Now we can handle GOT and GOT-based relocations properly, remove the > > undocumented `-Wa,-mla-{global,local}-with-{pcrel,abs}` assembler > > hacks. > I think "-Wa,-mla-{global,local}-with-{pcrel,abs}" may be regular > options rather than "hacks". If I'm right, the title and commit > message should be updated. And we can send patches to binutils to make > them "documented". How about changing the message to: GCC 13 no longer generates la.global and la.local in assembly, but produces explicit PC-relative relocations to local symbols and GOT entries for global symbols instead. As the result, -Wa,-mla-* are no longer sufficient to control the code generation for symbol address loading. As now we can handle GOT and GOT-based relocations properly, remove those options to use GOT for global symbol address consistently.