]> git.baikalelectronics.ru Git - kernel.git/commit
scripts/faddr2line: Fix regression in name resolution on ppc64le
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>
Tue, 27 Sep 2022 07:52:11 +0000 (13:22 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 8 Dec 2022 10:23:02 +0000 (11:23 +0100)
commite8e70c57581a196274c8842385491ab2394f5d0f
tree751a3bdc31287f04a39615d603a29ee40aa42d30
parentdd097934a5207cb2f0931a850271ec67093e9d2f
scripts/faddr2line: Fix regression in name resolution on ppc64le

[ Upstream commit cb08eb940f32997d8e858e2af367aa66a1c65de0 ]

Commit 054b92b902a7 ("scripts/faddr2line: Fix overlapping text section
failures") can cause faddr2line to fail on ppc64le on some
distributions, while it works fine on other distributions. The failure
can be attributed to differences in the readelf output.

  $ ./scripts/faddr2line vmlinux find_busiest_group+0x00
  no match for find_busiest_group+0x00

On ppc64le, readelf adds the localentry tag before the symbol name on
some distributions, and adds the localentry tag after the symbol name on
other distributions. This problem has been discussed previously:

  https://lore.kernel.org/bpf/20191211160133.GB4580@calabresa/

This problem can be overcome by filtering out the localentry tags in the
readelf output. Similar fixes are already present in the kernel by way
of the following commits:

  1d4f33c247b4 ("libbpf: Fix VERSIONED_SYM_COUNT number parsing")
  b7eca9898dd4 ("libbpf: Fix readelf output parsing for Fedora")

[jpoimboe: rework commit log]

Fixes: 054b92b902a7 ("scripts/faddr2line: Fix overlapping text section failures")
Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Reviewed-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Link: https://lore.kernel.org/r/20220927075211.897152-1-srikar@linux.vnet.ibm.com
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
scripts/faddr2line