Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp938189rwl; Thu, 5 Jan 2023 06:41:11 -0800 (PST) X-Google-Smtp-Source: AMrXdXv8zjayA5BnGiAFTIpo/s+jPJk0ZD2oPTsRnvsGjdQ7HOoqBOgZA9kVXckgkokfgVQeA403 X-Received: by 2002:a17:902:bc45:b0:188:b084:7bef with SMTP id t5-20020a170902bc4500b00188b0847befmr59194632plz.42.1672929671498; Thu, 05 Jan 2023 06:41:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672929671; cv=none; d=google.com; s=arc-20160816; b=IJTAVfK43NKaRXDId7VfLhkBDkuVtTsMqmivHmGYfm52h22wmj5r/PswdmirJabsRp HCGoEH0CrGFSTeUalK2t6zs9me8YeCwOlXL/QtHjEdbarI9Lv/YSzOoEdNVKeL5JT7tQ 4TchwomoW05NMAWPAN+yMkkkPZukZwaSl8+OTV5lqkRXfEyvR+izfsWh6Kd6K8Amv9a9 syhOs7zA/p4Relo/GIO7CjWOjqrqppaXYAwDEw/JS/zToXlJvOObXLonqTCol2rGA5/h 6cmPpMZYWl6YjefUHGGkx5sXcR9VmqkpHbGLMjw63mOrpmKjDX+/qT0F4Hjf25I1BG6S KllQ== 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=BBHlHFjvBOpIfsbcY2ZKG4d9UzzxTv3MkxdumEwPTwM=; b=tLpPCK4Zccx7jfw0BZ3ArDlh9lhPIobhaaqPmgYpuh9d6PVZxSwnzD2vCKV/cuErVZ U1YflQbmkTFO9L4ixKHk0DcNxLHV/4KGD7dzpkK6VTE3moSvq00XnUdmNnwru6s3HH8y rwhS7SmE+a0JhkAG5xg0PHqdmEIP3fo7kdxbnyXYZyJeKZ+K4i61tNgLJEx50dyzuB7z L+Sq1e+me8Ojl0UA2W0MDdBOiWQTftAoWzVMiXjIReDQyZtj/u7dxd3neCczJimDItSf /QBPhEZDlW7NzGVAtStgM3a8pseR5EGObLL7IGMo67ttE1cKXKtiunxID7yJutcxmC1b IBGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sMNHJLA1; 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 u4-20020a170902e5c400b00184306292a5si13583135plf.229.2023.01.05.06.41.04; Thu, 05 Jan 2023 06:41:11 -0800 (PST) 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=sMNHJLA1; 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 S233407AbjAENyZ (ORCPT + 56 others); Thu, 5 Jan 2023 08:54:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234623AbjAENxk (ORCPT ); Thu, 5 Jan 2023 08:53:40 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3F5E60CD8; Thu, 5 Jan 2023 05:50:28 -0800 (PST) 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 DA53461A8B; Thu, 5 Jan 2023 13:50:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 475A3C433D2; Thu, 5 Jan 2023 13:50:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672926623; bh=9rsuUbz5CFNU3FwjG7vhE4crM2pZKjhb8A7QPVly1mA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=sMNHJLA1AOuvHY4rKQLB05My6d9puPX+E16ZcLmQYery0xzrUtkasYGUUvZSw/2Gq iP8FseZ8M+ZTiyBokv3MfF+UUnVR6GdBzMg1R+wIqcwCqhWdc9pqu7YKFhmuxUM/uI RfZ9f8U4Vt07XRsdueVEO7W4zf0Uc781pkqLmYk/W+bQgZ/5XZs938GEhXCk3UXKSQ RptMX4nmwUyj0pZdhCir3ZuMs3E7r5NrwqQ3TqAGGmsvLYlFtLTBrxYLPTdbYXMtL0 17Oi+YHcFv4pATeaiVhmhiUW/nZF4uAPDfc8ojr1giiRRAc6OlytnhbZOQSEp/Lk4C 615SVG6DEl1DQ== Received: by mail-oi1-f176.google.com with SMTP id s187so31964215oie.10; Thu, 05 Jan 2023 05:50:23 -0800 (PST) X-Gm-Message-State: AFqh2koiiTAylMQFAL9v9q/GWFSz5bQLHFhjn5Sv55bnyPFap6KhxxY3 At1J0xlc8H00o47hsJbW7fMoxj6s7ayaN12kBN8= X-Received: by 2002:aca:3755:0:b0:35e:7c55:b015 with SMTP id e82-20020aca3755000000b0035e7c55b015mr2913154oia.287.1672926622568; Thu, 05 Jan 2023 05:50:22 -0800 (PST) MIME-Version: 1.0 References: <20221226184537.744960-1-masahiroy@kernel.org> <87fscp2v7k.fsf@igel.home> In-Reply-To: From: Masahiro Yamada Date: Thu, 5 Jan 2023 22:49:46 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] arch: fix broken BuildID for arm64 and riscv To: Ard Biesheuvel Cc: Andreas Schwab , Nathan Chancellor , linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Thorsten Leemhuis , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-riscv@lists.infradead.org, Dennis Gilmore , Albert Ou , Arnd Bergmann , Jisheng Zhang , Nicolas Schier , Palmer Dabbelt , Paul Walmsley , llvm@lists.linux.dev Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-7.1 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 On Thu, Jan 5, 2023 at 6:27 PM Ard Biesheuvel wrote: > > On Thu, 5 Jan 2023 at 10:21, Andreas Schwab wrote: > > > > On Jan 05 2023, Masahiro Yamada wrote: > > > > > I do not understand why 99cb0d917ffa affected this. > > > > > > > > > I submitted a fix to shoot the error message "discarded section .exit.text" > > > > > > https://lore.kernel.org/all/20230105031306.1455409-1-masahiroy@kernel.org/T/#u > > > > > > I do not understand the binutils commit either, > > > but it might have made something good > > > because EXIT_TEXT appears twice, in .exit.text, and /DISCARD/. > > > > I think the issue is that the introdution of a second /DISCARD/ > > directive early in script changes the order of evaluation of the other > > /DISCARD/ directive when binutils < 2.36 is used, so that the missing > > RUNTIME_DISCARD_EXIT started to become relevant. As long as /DISCARD/ > > only appears last, the effect of EXIT_TEXT inside it is always > > overridden by its occurence in the .exit.exit output section directive. > > When another /DISCARD/ occurs early (and binutils < 2.36 is used) the > > effect of EXIT_TEXT inside the second /DISCARD/ (when merged with the > > first) overrides its occurence in the .exit.text directive. The > > binutils commit changed that because the new /DISCARD/ directive no > > longer affects the order of evaluation of the rest of the directives. > > > > Exactly. The binutils change mentions output section merging, which > apparently applies to the /DISCARD/ pseudo section as well. > > However, powerpc was also affected by this, and I suggested another > fix in the thread below > > https://lore.kernel.org/all/20230103014535.GA313835@roeck-us.net/ Thanks for the pointer. (and sorry, I did not notice that thread, and missed to reply promptly) Your fix will work globally. I left some comments in that thread. -- Best Regards Masahiro Yamada