mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Srikar Dronamraju <srikar@linux.ibm.com>
To: Josh Poimboeuf <jpoimboe@kernel.org>
Cc: Brian Johannesmeyer <bjohannesmeyer@gmail.com>,
	Madhavan Srinivasan <maddy@linux.ibm.com>,
	linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Revert "scripts/faddr2line: Combine three readelf calls into one"
Date: Thu, 3 Dec 2026 08:07:52 +0530	[thread overview]
Message-ID: <axDWAK_eMPtmWMXF@linux.ibm.com> (raw)
In-Reply-To: <axCo-rpJOROhVCWl@jpoimboe>

* Josh Poimboeuf <jpoimboe@kernel.org> [2026-12-02 15:27:26]:

> On Tue, Sep 15, 2026 at 07:45:37AM +0530, Srikar Dronamraju wrote:
> > 
> > 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?
> 

No,

$ echo $SHELLOPTS
braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
$ set -o | grep -e fail -e pipe
pipefail        off
$ shopt | grep -e fail -e pipe
execfail        off
failglob        off
lastpipe        off
$ uname -m
ppc64le

And I face this problem with scripts/faddr2line only on ppc64le and not on x86 systems.

-- 
Thanks and Regards
Srikar Dronamraju

  reply	other threads:[~2026-12-03  2:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-05  1:24 Srikar Dronamraju
2026-09-14 19:00 ` Josh Poimboeuf
2026-09-15  2:15   ` Srikar Dronamraju
2026-09-23  9:26     ` Srikar Dronamraju
2026-11-25 15:47       ` Srikar Dronamraju
2026-12-02 23:27     ` Josh Poimboeuf
2026-12-03  2:37       ` Srikar Dronamraju [this message]
2026-12-03  4:49     ` Josh Poimboeuf
2026-12-03  6:46       ` Srikar Dronamraju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=axDWAK_eMPtmWMXF@linux.ibm.com \
    --to=srikar@linux.ibm.com \
    --cc=bjohannesmeyer@gmail.com \
    --cc=jpoimboe@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®