From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 80C0C606A322 for ; Wed, 2 Dec 2026 23:27:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CAt7UODA Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4jfv790VCnz3cdD; Thu, 03 Dec 2026 10:27:33 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=172.105.4.254 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1796254052; cv=none; b=TU90yhwweZI0TvES+2VnOk4WUCVQxcwnYw6ADV8yFsQj/+913oiON3OdyT/KmpJDGVFVMvbaY7e+2JH5tIcxA3lyJo9BG0irIL8Uw9+Dw1tpqEhNLCS/OUImGOWmDhSLpT+7BkxcaAgFsPotOSgDxyIdvcS1mR4mZruVG1gpNlUgMdiwNAOG1FFQWTI/RVdHlbnLWTIm+ZxjNITgjhPFLMsCYerTazG6uDnQjiFP3/llRuHooUvRVLxeVD13zk7ll6tCeTVWXrA/zJ+EULdT55QcMaJMjdhNw7xd4xuZh4lODww2sy95ORjyacT8vxvDdyT2QHBHF4q1qcxKGt4GFA== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1796254052; c=relaxed/relaxed; bh=Ma7XwUsmribMOWe0U1Xk+HaKIhArZ6drRxMjifOSSOY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=aNWvRkdsY53qH/XK6DMXg5UHvQ6QGXmlrgZg9qaicHKI2P5FFk0EL0io2lzZ0CHsvi+qCAswyYmWEqxZ11aXcxOfB9XPXU7AJ5u1zh3EVplQ/HOeYEuUevw8V47Xa0i8d7tapejr26oEnlik6VQD/Syz4kpL/fn2FLQPt0R0LsP3IiZQfQbavrfF1dk/Jvmpp2sp2uxWJTZFFQuqvjRSaz2R2tJ/P7WmhojeyvUmeQjxVGrY7arwiBQTDtIBgn+UQGtsKTp6ooto9Wm/QCeitlS9uNz0Z5H4YgZVXOaxDRiI+c2wkbDGyqopTx2Ucox4n6xbWtooOK2iHGAPfwP4OA== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CAt7UODA; dkim-atps=neutral; spf=pass (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=jpoimboe@kernel.org; receiver=lists.ozlabs.org) smtp.mailfrom=kernel.org Authentication-Results: lists.ozlabs.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CAt7UODA; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=jpoimboe@kernel.org; receiver=lists.ozlabs.org) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) (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 lists.ozlabs.org (Postfix) with ESMTPS id 4jfv776p2zz3c05 for ; Thu, 03 Dec 2026 10:27:31 +1100 (AEDT) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 0DA9661FEA; Wed, 2 Dec 2026 23:27:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC5AD1F0089A; Wed, 2 Dec 2026 23:27:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796254048; bh=Ma7XwUsmribMOWe0U1Xk+HaKIhArZ6drRxMjifOSSOY=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=CAt7UODA9tBcOuO9PJpsVuzqHNuneUbb0M0b1+/aZpLFd+m7vrXVrxG9vqi/EohqS icysIr/uGgRLuChXa8d2yzZI+vfw1K1QNWDXuaDcTvdB4c8+Zgy30Rbp8oytB6W7n2 xRLPYTWMqic0Y5/smru2VtlmibgtX/QkwCLRoPBomPXjZLLfckG1Qx5EMmFU0ejp3s 1JbwBo3OBDpunczM18Mg+Fy1TGE8zROInuNm4z//dY5i7F99ZNjmktZuW95iLFyEjg zRSefHwcaBBO6lVTIfDPpLWdrblzHfWswUK1kZaXYTNuFuXW0Yy15dqLF3/GzxScow 3CePlae1W/Bcw== Date: Wed, 2 Dec 2026 15:27:26 -0800 From: Josh Poimboeuf To: Srikar Dronamraju Cc: Brian Johannesmeyer , Madhavan Srinivasan , linuxppc-dev , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Revert "scripts/faddr2line: Combine three readelf calls into one" Message-ID: References: <20260905012449.3872882-2-srikar@linux.ibm.com> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , Precedence: list X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Tue, Sep 15, 2026 at 07:45:37AM +0530, Srikar Dronamraju wrote: > The other options are > > 1. to reset sed -o errexit in run_readelf > diff --git a/scripts/faddr2line b/scripts/faddr2line > index 622875396bcf..f1b83913d08c 100755 > --- a/scripts/faddr2line > +++ b/scripts/faddr2line > @@ -116,12 +116,14 @@ run_readelf() { > > ${READELF} --file-header --section-headers --symbols --wide "$objfile" > "$tmpfile" > > + set +o errexit > # This assumes that readelf first prints the file header, then the section headers, then the symbols. > # Note: It seems that GNU readelf does not prefix section headers with the "There are X section headers" > # line when multiple options are given, so let's also match with the "Section Headers:" line. > ELF_FILEHEADER=$(sed -n '/There are [0-9]* section headers, starting at offset\|Section Headers:/q;p' "$tmpfile") > ELF_SECHEADERS=$(sed -n '/There are [0-9]* section headers, starting at offset\|Section Headers:/,$p' "$tmpfile" | sed -n '/Symbol table .* contains [0-9]* entries:/q;p') > ELF_SYMS=$(sed -n '/Symbol table .* contains [0-9]* entries:/,$p' "$tmpfile") > + set -o errexit > > rm -f -- "$tmpfile" > } > > > 2. or use || true with sed, so that it doesn't fail. > > diff --git a/scripts/faddr2line b/scripts/faddr2line > index 622875396bcf..6e867b053ac4 100755 > --- a/scripts/faddr2line > +++ b/scripts/faddr2line > @@ -119,9 +119,9 @@ run_readelf() { > # This assumes that readelf first prints the file header, then the section headers, then the symbols. > # Note: It seems that GNU readelf does not prefix section headers with the "There are X section headers" > # line when multiple options are given, so let's also match with the "Section Headers:" line. > - ELF_FILEHEADER=$(sed -n '/There are [0-9]* section headers, starting at offset\|Section Headers:/q;p' "$tmpfile") > - ELF_SECHEADERS=$(sed -n '/There are [0-9]* section headers, starting at offset\|Section Headers:/,$p' "$tmpfile" | sed -n '/Symbol table .* contains [0-9]* entries:/q;p') > - ELF_SYMS=$(sed -n '/Symbol table .* contains [0-9]* entries:/,$p' "$tmpfile") > + ELF_FILEHEADER=$(sed -n '/There are [0-9]* section headers, starting at offset\|Section Headers:/q;p' "$tmpfile" || true) > + ELF_SECHEADERS=$(sed -n '/There are [0-9]* section headers, starting at offset\|Section Headers:/,$p' "$tmpfile" | sed -n '/Symbol table .* contains [0-9]* entries:/q;p' || true) > + ELF_SYMS=$(sed -n '/Symbol table .* contains [0-9]* entries:/,$p' "$tmpfile" || true) > > rm -f -- "$tmpfile" > } > > Note: only the SECHEADERS line needs true but adding true to just that line looks hacky. Hm, do you have SHELLOPTS=pipefail set in your environment? -- Josh