https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112656
--- Comment #8 from GCC Commits ---
The master branch has been updated by Indu Bhagat :
https://gcc.gnu.org/g:b6abc5dbfa5342347828b9feb4d9060071ff819c
commit r14-6112-gb6abc5dbfa5342347828b9feb4d9060071ff819c
Author: Indu Bhagat
Date: Mon D
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112656
--- Comment #7 from Indu Bhagat ---
Currently generating everything at finish () when -mco-re is in effect is
sufficient for BPF needs. BTF is generated late for -mco-re because of CO-RE
relocations: these are strings which record indexes into
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112656
Jose E. Marchesi changed:
What|Removed |Added
CC||david.faust at oracle dot com
--- Co
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112656
--- Comment #5 from Indu Bhagat ---
The reason for the noted difference in BTF for BPF vs non-BPF target is:
On non-BPF targets, BTF is emitted in early_finish. On BPF target however,
-mco-re is default, and hence, BTF is emitted in late finish
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112656
Indu Bhagat changed:
What|Removed |Added
CC||ibhagat at gcc dot gnu.org
--- Comment #4
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112656
--- Comment #3 from Jose E. Marchesi ---
clang does not emit BTF FUNC nor FUNC_PROTO entries for inlined functions. So
the fix is probably to not emit CTF_K_FUNCTION entries that have not been
handled in the FOR_EACH_FUNCTION loop.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112656
--- Comment #2 from Jose E. Marchesi ---
The btf_collect_datasec function in btf2out.cc traverses the cgraph and, for
each function, transforms its CTF_K_FUNCTION into a pair of BTF_KIND_FUNC_PROTO
and BTF_KIND_FUNC. But if the function is inli
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112656
--- Comment #1 from Jose E. Marchesi ---
Smaller reproducer:
static void log_event(const char *event_name, void *dev_ptr)
{
}
void lala ()
{
log_event ("foobar", ((void *)0));
}
Note that the FUNC_PROTO for log_event seems to