From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796273395; b=gYqJcCSKqU1WXrdK0myaevY+cqQFPHYfazDQdha0ozbYHFPcF/2aFLMRnn+bHWuDgthO 6yDT79N+LKYdmEPOSurhLGo69IcOSYnCqX8F1X/tgGe62hJ10z8KedIqitBMTh2UXSNBF VsaPeDm/sULkmTXHNFqxfI7D/Nv5jysTrst76H0kgW4+YditkH6ok4zAJ5tE/awlviKJ5 sxbkajH1S9VcXRF8wbdFzpw5eu5tZ0Bsd+bwkLsNV6Sbhf5mJqbGRJCZtrjJTw4xe21u1 ioSge6xsXtfo8gtQ9aZKWDnI0hG0oIt23LutiASTfbcXSUKtNez7lYe4IJjC0Bjwa1A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796273395; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=cE/wZRPVJXb16Erqo2lPQcvdaTaH1Frfeq3tBzQZh58=; b=VQRyb9KaLZ405MgpkIZ3f0p9S9k/j8FpoQRbXZ/vjJ6SaDjXhVcUf0dbk2BoRWQXH+k2 s1ZLz4YT2UL/i87XkUsVvrpqB2IwwA208TNCd7y8CHhbbQudj4bj5QcuX7GkYg8DcXdHK p4b8I1vV2rGaJf6HLqkCHkc09gB+xEn6gFb5dCyh6qtLvkAB8gydG26/lKimOQLFBQTsP ECPTkXStdtt+H0aRo7Q3+q5Qh58brmuc6pCIFP991wTPTInucalw5TbQbtsInltnZ/5Di dtO2+JJDdyqkaAqdRnXtca43rWKF4tpDY7GNAvGq9WHUCQL6PcwvaEZxQZogV9LpcBA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=e4m7r22s; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (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 6EB85606A32D for ; Thu, 3 Dec 2026 04:49:55 +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=e4m7r22s Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7764F1F00893; Thu, 3 Dec 2026 04:49:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796273395; bh=cE/wZRPVJXb16Erqo2lPQcvdaTaH1Frfeq3tBzQZh58=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=e4m7r22sZOgJDYyKmPaRBLCBI6E6+9Ep6gd8VGVbHT3ffaJyasdBfp1F3QlGAtJib Cnd4Qy7rc8ZQF66hkgqJRXMxbuJ8MaQjrxJqzJUuwNM7hvF6ejj6Hb3yWy0joT8tuE 4tJYuVtCweSurC7YAbgX+hIhQyavjY3PriGlsZb+D+BrD4jinLBtDanA83TR6BtrYa LKG741e8tIftZXhm4FVuYWJkN5OCa0AEjdlQjqgKSZ2IWEJSKAQCd5oQLs5nhBGHUf 0/ufe+avGU3Q0V5SaeG0BhZFfuTFnj0YRsqvyO0R2jDyx1e0rDk4de4HGDKblRCmhH Ffdkx6jUK2Alw== Date: Wed, 2 Dec 2026 20:49:52 -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: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Tue, Sep 15, 2026 at 07:45:37AM +0530, Srikar Dronamraju wrote: > ++ sed -n '/Symbol table .* contains [0-9]* entries:/q;p' > ++ sed -n '/There are [0-9]* section headers, starting at offset\|Section Headers:/,$p' /tmp/tmp.BGkKH2pxoy > + ELF_SECHEADERS='Section Headers: > [Nr] Name Type Address Off Size ES Flg Lk Inf Al > [ 0] NULL 0000000000000000 000000 000000 00 0 0 0 > [ 1] .head.text PROGBITS c000000000000000 010000 008000 00 AX 0 0 128 > [ 2] .text PROGBITS c000000000008000 018000 1474ed4 00 AX 0 0 256 > [ 3] .rodata PROGBITS c000000001480000 1490000 6217ce 00 WA 0 0 65536 > [ 4] .pci_fixup PROGBITS c000000001aa17d0 1ab17d0 004590 00 WA 0 0 8 > [ 5] .printk_index PROGBITS c000000001aa5d60 1ab5d60 00f770 00 WA 0 0 8 > [ 6] __ksymtab PROGBITS c000000001ab54d0 1ac54d0 045120 00 A 0 0 8 > [ 7] __kcrctab PROGBITS c000000001afa5f0 1b0a5f0 00b830 00 A 0 0 4 > [ 8] __kflagstab PROGBITS c000000001b05e20 1b15e20 002e0c 00 A 0 0 1 > [ 9] __ksymtab_strings PROGBITS c000000001b08c2c 1b18c2c 039a9c 01 AMS 0 0 1 > [10] __param PROGBITS c000000001b426c8 1b526c8 002e18 00 WA 0 0 8 > [11] __modver PROGBITS c000000001b454e0 1b554e0 0005a0 00 WA 0 0 8 > [12] __ex_table PROGBITS c000000001b45a80 1b55a80 002ab8 00 A 0 0 4 > [13] .notes NOTE c000000001b48538 1b58538 000088 00 A 0 0 4 > [14] .BTF PROGBITS c000000001b50000 1b60000 4d833d 00 A 0 0 1 > [15] .BTF_ids PROGBITS c000000002030000 2040000 00138c 00 A 0 0 1 > [16] .branch_lt PROGBITS c000000002040000 2050000 003030 00 WA 0 0 8 > [17] .got PROGBITS c000000002043100 2053100 000380 08 WA 0 0 256 > [18] __soft_mask_table PROGBITS c000000002043480 2053480 000080 00 A 0 0 8 > [19] __restart_table PROGBITS c000000002043500 2053500 0000c0 00 A 0 0 8 > [20] __stf_entry_barrier_fixup PROGBITS c0000000020435c0 20535c0 0001e8 00 A 0 0 4 > [21] __uaccess_flush_fixup PROGBITS c0000000020437a8 20537a8 000008 00 A 0 0 4 > [22] __entry_flush_fixup PROGBITS c0000000020437b0 20537b0 0001d8 00 A 0 0 4 > [23] __scv_entry_flush_fixup PROGBITS c000000002043988 2053988 000010 00 A 0 0 4 > [24] __stf_exit_barrier_fixup PROGBITS c000000002043998 2053998 000060 00 A 0 0 4 > [25] __rfi_flush_fixup PROGBITS c0000000020439f8 20539f8 000060 00 A 0 0 4 > [26] __spec_barrier_fixup PROGBITS c000000002043a58 2053a58 000690 00 A 0 0 4 > [27] .init.text PROGBITS c000000003000000 3010000 0b0000 00 WAX 0 0 32 > [28] .exit.text PROGBITS c0000000030b0000 30c0000 004158 00 AX 0 0 32 > [29] .init.data PROGBITS c0000000030c0000 30d0000 1c4580 00 WA 0 0 65536 > [30] __ftr_fixup PROGBITS c000000003284580 3294580 00eaf0 00 A 0 0 8 > [31] __mmu_ftr_fixup PROGBITS c000000003293070 32a3070 001830 00 A 0 0 8 > [32] __lwsync_fixup PROGBITS c0000000032948a0 32a48a0 000dc8 00 A 0 0 4 > [33] .data..percpu PROGBITS c0000000032a0000 32b0000 1e0e58 00 WA 0 0 4096 > [34] .machine.desc PROGBITS c000000003480e58 3490e58 000410 00 WA 0 0 8 > [35] .dynsym DYNSYM c000000003481268 3491268 000048 18 A 36 3 8 > [36] .dynstr STRTAB c0000000034812b0 34912b0 000001 00 A 0 0 1 > [37] .dynamic DYNAMIC c0000000034812b8 34912b8 000120 10 WA 36 0 8 > [38] .gnu.hash GNU_HASH c0000000034813d8 34913d8 00001c 00 A 35 0 8 > [39] .rela.dyn RELA c0000000034813f8 34913f8 519030 18 A 35 0 8 > [40] .data PROGBITS c0000000039a0000 39b0000 610100 00 WA 0 0 128 > [41] .data..init_task NOBITS c000000003fb4000 3fc0100 004000 00 WA 0 0 1 > [42] .data..page_aligned PROGBITS c000000003fc0000 3fd0000 010000 00 WA 0 0 65536 > [43] .data..cacheline_aligned PROGBITS c000000003fd0000 3fe0000 023500 00 WA 0 0 128 > [44] .data..read_mostly PROGBITS c000000003ff3500 4003500 03cb80 00 WA 0 0 128 > [45] .data_nosave PROGBITS c000000004040000 407bcec 000000 00 W 0 0 1 > [46] __bug_table PROGBITS c000000004040000 4050000 02bcec 00 WA 0 0 1 > [47] .bss NOBITS c000000004070000 407bcec 725338 00 WA 0 0 65536 > [48] .debug_aranges PROGBITS 0000000000000000 407bcf0 0279d0 00 0 0 16 > [49] .debug_info PROGBITS 0000000000000000 40a36c0 fa4d575 00 0 0 1 > [50] .debug_abbrev PROGBITS 0000000000000000 13af0c35 673114 00 0 0 1 > [51] .debug_line PROGBITS 0000000000000000 14163d49 211a8e7 00 0 0 1 > [52] .debug_frame PROGBITS 0000000000000000 1627e630 3ba1f8 00 0 0 8 > [53] .debug_str PROGBITS 0000000000000000 16638828 426e36 01 MS 0 0 1 > [54] .debug_line_str PROGBITS 0000000000000000 16a5f65e 0004f5 01 MS 0 0 1 > [55] .debug_loclists PROGBITS 0000000000000000 16a5fb53 1efdaf5 00 0 0 1 > [56] .debug_rnglists PROGBITS 0000000000000000 1895d648 4d9186 00 0 0 1 > [57] .comment PROGBITS 0000000000000000 18e367ce 00002e 01 MS 0 0 1 > [58] .symtab SYMTAB 0000000000000000 18e36800 42b670 18 59 150524 8 > [59] .strtab STRTAB 0000000000000000 19261e70 379870 00 0 0 1 > [60] .shstrtab STRTAB 0000000000000000 195db6e0 000302 00 0 0 1 > Key to Flags: > W (write), A (alloc), X (execute), M (merge), S (strings), I (info), > L (link order), O (extra OS processing required), G (group), T (TLS), > C (compressed), x (unknown), o (OS specific), E (exclude), > D (mbind), p (processor specific)' > > > to see what line it's failing at? > > > > As you can see, the last executed line line is > > 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') > which it self is called from run_readelf > > since sed -o errexit is set in the script, sed returns an non-zero error > and that causes the script to exit if the line is not found. Hm... since it's a silent failure it really seems like a pipefail. Can you run "echo $" immediately after the script to get the exit code? And then after that, change the ELF_SECHEADERS line to: 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'; echo "PIPESTATUS=${PIPESTATUS[*]} SHELLOPTS=$SHELLOPTS" >&2) and then run again and see what is shown for PIPESTATUS and SHELLOPTS. -- Josh