[PATCH v3 0/2] perf symbol: Minor fixing

Leo Yan posted 2 patches 3 years, 4 months ago
tools/perf/util/symbol-elf.c | 56 +++++++++++++++++++++++++++++++++---
1 file changed, 52 insertions(+), 4 deletions(-)
[PATCH v3 0/2] perf symbol: Minor fixing
Posted by Leo Yan 3 years, 4 months ago
This patch set contains two minor fixing for parsing symbols.

The first patch changes to use program header for parsing symbols of
user space executable and shared objects.  Since kernel's symbol parsing
is more complex than userspace for support both kernel symbols and module
symbols, this is why this patch set uses conservative way and doesn't
change kernel symbols parsing.

The second patch is to detect symbols from sections without setting
attribute flag SHF_ALLOC, these symbols are used for linker warning,
skip to record them to avoid spurious symbols.

Changes from v2:
- Changed to use more gernal way to check the attribute bit SHF_ALLOC
  for sections rather than check the section string name (Fangrui).

Changes from v1:
- Changed to use program header / PT_LOAD segments to parse symbols for
  userspace executable and shared object files (Fangrui).


Leo Yan (2):
  perf symbol: Correct address for bss symbols
  perf symbol: Skip symbols if SHF_ALLOC flag is not set

 tools/perf/util/symbol-elf.c | 56 +++++++++++++++++++++++++++++++++---
 1 file changed, 52 insertions(+), 4 deletions(-)

-- 
2.25.1
Re: [PATCH v3 0/2] perf symbol: Minor fixing
Posted by Namhyung Kim 3 years, 4 months ago
Hi Leo,

On Sat, Jul 23, 2022 at 11:00 PM Leo Yan <leo.yan@linaro.org> wrote:
>
> This patch set contains two minor fixing for parsing symbols.
>
> The first patch changes to use program header for parsing symbols of
> user space executable and shared objects.  Since kernel's symbol parsing
> is more complex than userspace for support both kernel symbols and module
> symbols, this is why this patch set uses conservative way and doesn't
> change kernel symbols parsing.
>
> The second patch is to detect symbols from sections without setting
> attribute flag SHF_ALLOC, these symbols are used for linker warning,
> skip to record them to avoid spurious symbols.
>
> Changes from v2:
> - Changed to use more gernal way to check the attribute bit SHF_ALLOC
>   for sections rather than check the section string name (Fangrui).
>
> Changes from v1:
> - Changed to use program header / PT_LOAD segments to parse symbols for
>   userspace executable and shared object files (Fangrui).
>
>
> Leo Yan (2):
>   perf symbol: Correct address for bss symbols
>   perf symbol: Skip symbols if SHF_ALLOC flag is not set

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung


>
>  tools/perf/util/symbol-elf.c | 56 +++++++++++++++++++++++++++++++++---
>  1 file changed, 52 insertions(+), 4 deletions(-)
>
> --
> 2.25.1
>
Re: [PATCH v3 0/2] perf symbol: Minor fixing
Posted by Leo Yan 3 years, 4 months ago
On Mon, Jul 25, 2022 at 09:54:21AM -0700, Namhyung Kim wrote:

[...]

> > This patch set contains two minor fixing for parsing symbols.

> Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks for reviewing, Namhyung.

Leo