Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp594842rwl; Thu, 5 Jan 2023 01:36:53 -0800 (PST) X-Google-Smtp-Source: AMrXdXsDn7v1DQSUe4YJfPCeCCxF/9fu0QfhVMlMvU8U3mxUShDe7LWIVooE6dj8la8xX7T4sV+O X-Received: by 2002:a17:90a:7404:b0:223:de03:7297 with SMTP id a4-20020a17090a740400b00223de037297mr53685973pjg.10.1672911412933; Thu, 05 Jan 2023 01:36:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672911412; cv=none; d=google.com; s=arc-20160816; b=nH86GJUBZhlMzdeNkG9eUTvehyE2/aaro31wTD4XhapwDAGW3Td00TP4wgKLD/ipT1 o2pM60K9BtgC3qDZeNLM/qabXng1exaXPwcKqqpICEaCR2pVcbzn4DThivTnkUJUY2bj 4cbStrJMegVsdKBLm4ICXTW9h/TaTgz5/SBDyw0Gt30VAu/rc/q3/4dKBIXZuUJ8A/AX nH25gh5ahWTyWG37sshH2y1B5vhRNcH9fUAGWlwN14UB9Vr5I4Y77xCU0hIwl9tWQhT4 0YiD5hdgGtANuEC3oYgLEzIiO4VyrnAJEDZNofnngsNSDixl9hWtwgB6AJpesp7yYplk bvAw== 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=ZTj1CLQU9kO9+1T9WlK2Ix+K/y8VrADMesu1agODnxg=; b=Hdb3LyAh51t6Ww6b5V3hT5YXLmRzc5x+epGU8Lfo3rAjVacDizMs3iM5hMJ7YzIaOc FaW0+0HfelWf32RSfMFJ3EHYQJ2WeqD1Ai87DcqgPS4nYLddImPCyO+g24QwwMXFg1rS AFUoHACt3//hhK7Wr4YhFHiHXx4UGYcSEa/uZYucGI+kQ6S2xftV3AzzeqFxtg7bcRJS lJFp8/s8fIAtoZtBY9MDb6dF1LC6/orT8MpiNIrWpmtk1E9nR/+BEPvzGbr7G/IOMtx8 fEXkzgJnd64CdNKS7GjoUYFL8hyfmUMD2sLpFwZ8cLQ0uSK9GO2XJ7OaRHYpX8WuPHcM vTpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="e/TMjCWV"; 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 hk10-20020a17090b224a00b00225de00d4dfsi1504726pjb.118.2023.01.05.01.36.45; Thu, 05 Jan 2023 01:36:52 -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="e/TMjCWV"; 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 S232086AbjAEJ1Z (ORCPT + 57 others); Thu, 5 Jan 2023 04:27:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231977AbjAEJ1W (ORCPT ); Thu, 5 Jan 2023 04:27:22 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 179EE50E56; Thu, 5 Jan 2023 01:27:20 -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 ams.source.kernel.org (Postfix) with ESMTPS id 5DCA7B81A3A; Thu, 5 Jan 2023 09:27:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2670CC43396; Thu, 5 Jan 2023 09:27:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672910838; bh=AoenQ7qr+Q+w0pYT0UssjkyKOV1r0ACZanFVsuqcXzA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=e/TMjCWVTXw05xrUmAEKmEF0btABjqM9NxgNFERQCosn7sNcPQkucCuuPuxxnr9os mAgVMVZWTzp+AZoiZMmhoenf0ry2AQMlpr5HqbWjUcbCCv+Hnla1rwSfT5tZBYGad0 YXR2BUosolLeT/zRLZmVhfiROubw5U8Fyba/QsqMsiAusLniONfyh5ktiWZpVIPYGH VAUYDuJTAlVLO0YAmBPQqdHv02BqFUkMVpWKwzFkIWkphDGwm0Nnpy95dHYhrdoI8W t+xVtTXT/v/rnv/J//wGAE4+8kN4Q5/w2gyVVStK7E1MZldSTRovlKE34QcBGRLbxD hF/Pinjhl2XjA== Received: by mail-lj1-f172.google.com with SMTP id g14so38066149ljh.10; Thu, 05 Jan 2023 01:27:18 -0800 (PST) X-Gm-Message-State: AFqh2kr08PpMyBeJRsIsnsbJy8HD9flxv7yA5oMGFMCPkjzd4ZrDRcDw oXDoTCf1mjx6li7DbE7zV2pgXhpdtRGtxGdVUMw= X-Received: by 2002:a2e:bd0c:0:b0:27f:bc58:3924 with SMTP id n12-20020a2ebd0c000000b0027fbc583924mr2884615ljq.352.1672910836054; Thu, 05 Jan 2023 01:27:16 -0800 (PST) MIME-Version: 1.0 References: <20221226184537.744960-1-masahiroy@kernel.org> <87fscp2v7k.fsf@igel.home> In-Reply-To: <87fscp2v7k.fsf@igel.home> From: Ard Biesheuvel Date: Thu, 5 Jan 2023 10:27:04 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] arch: fix broken BuildID for arm64 and riscv To: Andreas Schwab Cc: Masahiro Yamada , 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, 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/