On Wed, Jun 22, 2022 at 05:35:05PM +0000, Daniel Müller wrote: > diff --git a/tools/lib/bpf/relo_core.c b/tools/lib/bpf/relo_core.c > index 6ad3c3..e54370 100644 > --- a/tools/lib/bpf/relo_core.c > +++ b/tools/lib/bpf/relo_core.c > @@ -141,6 +141,84 @@ static bool core_relo_is_enumval_based(enum bpf_core_relo_kind kind) > } > } > > +int bpf_core_types_are_compat_recur(const struct btf *local_btf, __u32 local_id, > + const struct btf *targ_btf, __u32 targ_id, int level) > +{ [...] > + > + /* tail recurse for return type check */ > + skip_mods_and_typedefs(local_btf, local_type->type, &local_id); > + skip_mods_and_typedefs(targ_btf, targ_type->type, &targ_id); > + goto recur; > + } > + default: > + return 0; I actually left out the pr_warn here (present in libbpf but not the kernel). I suppose it would be best to carry it over from libbpf? Thanks, Daniel