On Sat, Nov 14, 2020 at 2:39 PM Jiri Olsa <jolsa@xxxxxxxxxx> wrote: > > hi, > recent btf encoder's changes brakes BTF data for some gcc > versions. The problem is that some functions can appear > in dwarf data in some instances without arguments, while > they are defined with some. Hey Jiri, So this approach with __start_mcount_loc/__stop_mcount_loc works for vmlinux only, but it doesn't work for kernel modules. For kernel modules there is a dedicated "__mcount_loc" section, but no __start/__stop symbols. I'm working around for now by making sure functions that I need are global, but it would be nice to have this working for modules out of the box as well. If you get a chance to fix this soon, that would be great. If not, I'll try to get to this ASAP as well, because it would be nice to have this in the same version of pahole that got static function BTFs for vmlinux (if Arnaldo doesn't mind, of course). > > v3 changes: > - move 'generated' flag set out of should_generate_function > - rename should_generate_function to find_function > - added ack > > v2 changes: > - drop patch 3 logic and just change conditions > based on Andrii's suggestion > - drop patch 2 > - add ack for patch 1 > > thanks, > jirka > > > --- > Jiri Olsa (2): > btf_encoder: Generate also .init functions > btf_encoder: Fix function generation > > btf_encoder.c | 86 +++++++++++++++++++++----------------------------------------------------------------- > 1 file changed, 21 insertions(+), 65 deletions(-) >