Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp583591rwl; Thu, 5 Jan 2023 01:25:05 -0800 (PST) X-Google-Smtp-Source: AMrXdXuXoUaOndG1JYP1iI9LpCBlTQT7UQvG+jKdXflejddnsmHK04RCm3OQQYqT+btBQRaVfRPn X-Received: by 2002:a05:6a21:7884:b0:af:98cd:7df1 with SMTP id bf4-20020a056a21788400b000af98cd7df1mr74795059pzc.24.1672910704924; Thu, 05 Jan 2023 01:25:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672910704; cv=none; d=google.com; s=arc-20160816; b=U9YlNwCxD+qDPRGVYq1IA6z/EuvvfKb9WrsCXb9EZ0gt3bHDcVeipjEUzns/WYnTef 3Io4eOFGCqfEuDq+8Qno/aGrD1Em4Q9wLy78nC4i78SmsYu9cwgZBHGBDs8Xf9BAn6Ly 7Jn9YMaqWojqgMSFGeuNAg4TS9ysXN7RqXCgR7i8xHdR/wLLs0wDyOlxTCRCl3LWPtHr 2zw9uVCdhzfRaJdDknd++wZ2UF0mu4+XMN7PKtHqQk4PVadTYl4W2MyhWPkKhOeBBn3a x/Fli3UZZTaCJOC9pATRfAp1lEByDFTe1kXU4TLfRKWuLa+ynCdhopcTSIqcXg3C4K6c NHeA== 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:message-id:in-reply-to :date:references:subject:cc:to:from; bh=ZFpoPZY2VGFdawBa+XFwtfzxnQ0gWR0Xkq+8gARBlfU=; b=h9/Ig5AbbaSDeT59PcDMIkxudQYth4DCQ81kHPejP+C9TmAHTPYtJjik0oEhPVff5a KKBah9R3sqJ7XE07ibmAX9WNyMmbANg19YPWKyioTgoV8E9pERIUWUKt4akelp2cPc/y 84ZVoX7PJOVvN+JKoejK2LN8xAV2bKFaR+Hrol5ThzpI+e4adD0yXU4wYSaab9FRGin/ bYtvQsAb6wD4XGJxWU3dWJTPX6wPtMjjTuvLBvmxj1OtA9yf6zlhGfVa1C/8VrjuD7ew pD2Y6QAWUiU0QOeNMkj9hvt01hl6Ta+P47eIKRDYtpQfHIrySz1kRiIajqLxuhpTIxGQ UrQg== ARC-Authentication-Results: i=1; mx.google.com; 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 t37-20020a634625000000b004774fa3d9cesi38692019pga.618.2023.01.05.01.24.57; Thu, 05 Jan 2023 01:25:04 -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; 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 S231640AbjAEJVT (ORCPT + 55 others); Thu, 5 Jan 2023 04:21:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230479AbjAEJVS (ORCPT ); Thu, 5 Jan 2023 04:21:18 -0500 Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08897544FA; Thu, 5 Jan 2023 01:21:12 -0800 (PST) Received: from frontend03.mail.m-online.net (unknown [192.168.6.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Nngv62wn5z1s89H; Thu, 5 Jan 2023 10:21:06 +0100 (CET) Received: from localhost (dynscan3.mnet-online.de [192.168.6.84]) by mail.m-online.net (Postfix) with ESMTP id 4Nngv558R4z1qqlR; Thu, 5 Jan 2023 10:21:05 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan3.mail.m-online.net [192.168.6.84]) (amavisd-new, port 10024) with ESMTP id BAUSzBWqsYNC; Thu, 5 Jan 2023 10:21:03 +0100 (CET) X-Auth-Info: ULmWuHDbYpDzw7fgn9yZLoIMWYSx2BoKlnKiH1/oFq17cjDTOLj3zE3OV4yRXdz9 Received: from igel.home (aftr-62-216-205-97.dynamic.mnet-online.de [62.216.205.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Thu, 5 Jan 2023 10:21:03 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id 881052C126D; Thu, 5 Jan 2023 10:21:03 +0100 (CET) From: Andreas Schwab To: Masahiro Yamada Cc: Nathan Chancellor , linux-arch@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Ard Biesheuvel , 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 References: <20221226184537.744960-1-masahiroy@kernel.org> X-Yow: BEEP-BEEP!! I'm a '49 STUDEBAKER!! Date: Thu, 05 Jan 2023 10:21:03 +0100 In-Reply-To: (Masahiro Yamada's message of "Thu, 5 Jan 2023 12:22:50 +0900") Message-ID: <87fscp2v7k.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,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 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. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."