Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp4766imn; Thu, 28 Jul 2022 19:51:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1smdAieC/XOv8o2cJ6XcCnCNOFHncgFxGXgn41PB6uxElyHIQrN4Jc3uCNlhbewJysbv+MD X-Received: by 2002:a17:907:608d:b0:72f:191b:7625 with SMTP id ht13-20020a170907608d00b0072f191b7625mr1301033ejc.754.1659063062245; Thu, 28 Jul 2022 19:51:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659063062; cv=none; d=google.com; s=arc-20160816; b=Dv8dco7zquYOjCoWHLosXGyieAf5KbbRQRAnh+WiURrmB2qpwP8Ku7Je71V0tzdOpl SEGrphxsWs82cgaveasHvVwQXuG2mkQQzMZQJ9ELKkLs2aRkIMjat/32vVurUgJPaMBH Itt340JhUKI8kWjKN0ja5NB2h0EbimGgFSUoOaHDVV7YMPYti8TJOt2GkR8BTDz+b3ve +tQepSV3b0FEKh9TYQWScS9uQNBIeuVYQB1PH0zrUQfWeVzdPaAnvJezWYya1I6HDQMD 9tm+dA+e79UYwG5Ah1+ZcGvXSOtBNJHfk2ErFsNjrnO8EMfHgqb1dxQBeUDrjogrdMPL 2CLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=fJkiaKWQlBjQqpKBik4w1EB89SSDcM6zIokboL9FBNk=; b=v4wtAxsVbuk5k4gMOeBF0SshGDUJbUFHCVMc1gvmHm07tt4eeWo8vDnZvmKX3i68Vk affHQz3DL92NNwVV7Vx2NEzBW8d7oYH4z8L6n0rR1n4NiAUFWSSAetXNE71enBxiFC5B 6zHLQ9cRRzl+H+jX+e/MDejYMwePzHphx+j68LaTTtYNH38w895jrdv6vchUX8yWcPMj efaBqRlTmxq6aaUxPhEnNuX8ytzAHEb0nSITAkDBtfiBlzuwajbOVJvHJeFrNIG8tMM9 HE+uQ1FYqx9Kh4tfruzuINkjvAE3u/847VTuFrlrH8Y3Rb3GmW2958E9K8XvYkkuhiXX Gbzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r1VZnR41; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l22-20020a170906795600b0072b1e29c58esi2610141ejo.153.2022.07.28.19.50.37; Thu, 28 Jul 2022 19:51: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=@kernel.org header.s=k20201202 header.b=r1VZnR41; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232005AbiG2Cqg (ORCPT + 99 others); Thu, 28 Jul 2022 22:46:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32978 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229559AbiG2Cqf (ORCPT ); Thu, 28 Jul 2022 22:46:35 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D81261723 for ; Thu, 28 Jul 2022 19:46:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BFECC61DDB for ; Fri, 29 Jul 2022 02:46:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29750C4347C for ; Fri, 29 Jul 2022 02:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659062794; bh=w4Wkpn0druzPuiqSOhHxN7Fku75Q30SBmK1KU9uVjn0=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=r1VZnR41b0F/2zvn35yxe37yr0wgVu/7CaQhktQtwol3ZENRxDnC5NIKYzw7QyHYA RS8o6RcoqSdNI1KRYchZZI/XdSs3Qn6nnAOmp4TIhY/VZWTFOhsfY+R5GFWiIIx+1k N7EHps2jiCQr15qf7jAIH/SW1ZWsbdIBAKvsHBqLv/VfYVC4CgwcyZOSWF0YEvcZbc WqAHB0eN/2zc3ScVwqWGaIQt1X94mc2ivwgJNschmyXvx/PM5rHid5VdHG4XCa2265 IjYKpjH51AHMu44/j0gjwmBtJ+RMAZlt/RbTUBYtoSfwcFQKsyZQt/6T0L2/Y1UcNE ZnGgj0Y4JbHXg== Received: by mail-vs1-f49.google.com with SMTP id k3so3303412vsr.9 for ; Thu, 28 Jul 2022 19:46:34 -0700 (PDT) X-Gm-Message-State: AJIora84F2h5kHbVg9nXl7tpA/3Y98W10HR9DawaB6CmDgMJGlcjR6v0 wkn1TBFDmtNbJM3QH9UAouphasQ0RgYSmt5ixHI= X-Received: by 2002:a05:6102:3d3:b0:358:8a04:30cb with SMTP id n19-20020a05610203d300b003588a0430cbmr530018vsq.43.1659062793140; Thu, 28 Jul 2022 19:46:33 -0700 (PDT) MIME-Version: 1.0 References: <615b5bc79c9e48409361bde1af9374cacb06ec9c.camel@xry111.site> In-Reply-To: <615b5bc79c9e48409361bde1af9374cacb06ec9c.camel@xry111.site> From: Huacai Chen Date: Fri, 29 Jul 2022 10:46:19 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 3/4] LoongArch: Stop using undocumented assembler options To: Xi Ruoyao Cc: loongarch@lists.linux.dev, LKML , WANG Xuerui , Youling Tang , Jinyang He Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Hi, Ruoyao, On Thu, Jul 28, 2022 at 9:10 PM Xi Ruoyao wrote: > > On Thu, 2022-07-28 at 20:25 +0800, Huacai Chen wrote: > > Hi, Ruoyao, > > > > On Thu, Jul 28, 2022 at 8:03 PM Xi Ruoyao wrote: > > > > > > 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. GCC 13 can still generate la.global and la.local, so "GCC 13 no longer generates la.global and la.local in assembly by default" may be better. And "undocumented" in the title should be "non-preferred", I think. Huacai