https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97060

--- Comment #11 from Jiri Olsa <jolsa at redhat dot com> ---
(In reply to Jakub Jelinek from comment #10)
> RHEL8 uses gcc 8 which is not affected (unless one uses DTS/GTS).
> Also, it is unclear for what in particular pahole or what wants to use
> DW_AT_declaration.

pahole takes dwarf data and produces BTF type data
that includes functions

the DW_AT_declaration flag was used to skip function
declarations so only one function record was processed
and added to BTF data

without that flag pahole will add one function multiple
times to BTF data, based on how many times it was declared
in other objects

> DW_TAG_subprogram of a real definition (that hasn't been optimized out) is
> the one that has DW_AT_low_pc/DW_AT_high_pc or DW_AT_ranges attributes (i.e.
> has any associated code).  Some functions can have many definitions (e.g.
> inline functions or other comdat entities).

I'll check if we can add more check to pahole for this

thanks

Reply via email to