Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp700846rwl; Thu, 5 Jan 2023 03:25:15 -0800 (PST) X-Google-Smtp-Source: AMrXdXsnW6ogLJigr8vn86HrrdKuj78pgrJwEf+P6ZZF59/DWwRo6izG9lF7Gj/2TMLxOX7vTG9V X-Received: by 2002:a50:d659:0:b0:463:aeaf:338f with SMTP id c25-20020a50d659000000b00463aeaf338fmr47508306edj.32.1672917915632; Thu, 05 Jan 2023 03:25:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672917915; cv=none; d=google.com; s=arc-20160816; b=ME+vhMRQg1ogU4S9PM43NQCVexTa9AxRy656tqI9gUobZsjJvPK1TKQ0tkq7S555rJ T5JWJHCx3D+PugIUMF84XaTllCu/aUO8aF/jruyCqO2fIjRz//HuN5CG1boV1/Adl/rn DzirOspIEnDrhd2BA7Xxbwzm6kD9A1sOmlH2kshgdA02N5J+jiMFWpn4OWOKC6HEFzbh FlANNi4nFB7zU284nV92Ex9r00N6UR5kMWeZtXKu+KTpW9rkyOqZWopTzft91EDRdLDv uT39S5khsTJjmKeDWxPyS8SHukfjLaz7jc92p0ika3DmwK1H2NvAutxBSDx49KfqNYai n7Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=H58PB5dB0RHrhFpgNYwPMvKuMcKWPpw8G9iLJXZd65A=; b=R8YNQDDyL+C5CYtnKYF0NbB8UCNwAjebAEaV5lXeXWUyyqVFOS3VvQHhIyBBJzd0G5 PSTyLzJjdZcghM/TgXlU+0mmpL+E4ve3TtbnyVbJgU1j/DVCODSk4qXmWJaHJHiDkgTu UUCZvHUJfxTxRl9TztRrp171O3q5fu6jlQeNRVVAY9NRi/HeCHw9pZKcN7t5d3qqTBjr faeVljxUowBRiO8SZ9mUVoeGO+3Gs3lK1FSNWWgH0mhY6VVtY9GWGGIYdMAozAVYdKIM ytP2+jYnquxYUbxPd6WZjxeHPTRN8ZRBcV/SORoZocPSdbqpxIIDgACCzr+vU66nzE1o /KLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b="j/cwOOWY"; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fd6-20020a056402388600b004844b4fe450si26869900edb.407.2023.01.05.03.25.02; Thu, 05 Jan 2023 03:25:15 -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=@ellerman.id.au header.s=201909 header.b="j/cwOOWY"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232667AbjAELOr (ORCPT + 55 others); Thu, 5 Jan 2023 06:14:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232549AbjAELOk (ORCPT ); Thu, 5 Jan 2023 06:14:40 -0500 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87FA14E429; Thu, 5 Jan 2023 03:14:33 -0800 (PST) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4NnkPn2PdWz4xyp; Thu, 5 Jan 2023 22:14:21 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ellerman.id.au; s=201909; t=1672917269; bh=H58PB5dB0RHrhFpgNYwPMvKuMcKWPpw8G9iLJXZd65A=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=j/cwOOWYJWVodOQKWxwA65hoiWL4SWeIvVb4ffTACF3VKkA3elmaJ1hYI+wZXwx9L RJ8aLHL842B7PawFJSpXS1qAYC9xwNFOV8u7rmFvlQO7LJk/Wwp3W8tO/xES+41iMV 7mOwnQhFKX0M/lIRco+2PSiXUa28qRGAU3HnP78MWuRaw+0+pwWQ01XnpelZX/NpC4 MfHAlNtln3QY7tMEcO2VhEKgPhkJFZwH/aZcLHMO77/gEXnpJPVJPk5h3IAQbX/wKC VXb38ngZxmv8RGPyOx8tTFiTtLmMVwSUMs8gztUA0pKa5j1o26PlSFhzs4RJ6rVJOY 3RocSLreOfmbw== From: Michael Ellerman To: Ard Biesheuvel , 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 Subject: Re: [PATCH v2] arch: fix broken BuildID for arm64 and riscv In-Reply-To: References: <20221226184537.744960-1-masahiroy@kernel.org> <87fscp2v7k.fsf@igel.home> Date: Thu, 05 Jan 2023 22:14:20 +1100 Message-ID: <87y1qh2pyr.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, 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 Ard Biesheuvel writes: > 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/ I'm working on powerpc fixes, which I think are all improvements regardless of whether your change in the above thread is merged or not. I'll try and get them posted tonight. cheers