lkml.org 
[lkml]   [2022]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] scripts/faddr2line: Fix regression in name resolution on ppc64le
Thadeu Lima de Souza Cascardo wrote:
> On Tue, Sep 27, 2022 at 01:22:11PM +0530, Srikar Dronamraju wrote:
>> Commit 1d1a0e7c5100 ("scripts/faddr2line: Fix overlapping text section failures")
>> can cause scripts/faddr2line to fail on ppc64le machines on few
>> distributions, while working on other distributions. The failure can be
>> attributed to difference in readelf output on various distributions.
>>
>> $ ./scripts/faddr2line vmlinux find_busiest_group+0x00
>> no match for find_busiest_group+0x00
>>
>> Expected output was:
>> $ ./scripts/faddr2line vmlinux find_busiest_group+0x00
>> find_busiest_group+0x00/0x3d0:
>> find_busiest_group at kernel/sched/fair.c:9595
>>
>> On ppc64le, readelf adds localentry tag before the symbol name on few
>> distributions and adds the localentry tag after the symbol name on few
>> other distributions. This problem has been discussed in the reference
>> URL given below. This problem can be overcome by filtering out
>> localentry tags in readelf output. Similar fixes are already present in
>> kernel by way of commits:
>>
>> 1fd6cee127e2 ("libbpf: Fix VERSIONED_SYM_COUNT number parsing")
>> aa915931ac3e ("libbpf: Fix readelf output parsing for Fedora")
>>
>> Fixes: 1d1a0e7c5100 ("scripts/faddr2line: Fix overlapping text section failures")
>> Reference: https://lore.kernel.org/bpf/20191211160133.GB4580@calabresa/
>> Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
>> Cc: Jiri Olsa <jolsa@kernel.org>
>> Cc: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
>
> Reviewed-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
>
> The other instances of readelf --wide on faddr2line use --section-headers and
> should not required the same mangling.

There's one usage of readelf with --file-header in faddr2line which also
doesn't need this. The extra information being printed is from st_other
and is very specific to the symbol table.

Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>


- Naveen

\
 
 \ /
  Last update: 2022-09-30 13:30    [W:0.064 / U:0.640 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site