Lines Matching refs:btf
22 skip_mods_and_typedefs(const struct btf *btf, u32 id, u32 *res_id) in skip_mods_and_typedefs() argument
24 return btf_type_skip_modifiers(btf, id, res_id); in skip_mods_and_typedefs()
27 static const char *btf__name_by_offset(const struct btf *btf, u32 offset) in btf__name_by_offset() argument
29 return btf_name_by_offset(btf, offset); in btf__name_by_offset()
32 static s64 btf__resolve_size(const struct btf *btf, u32 type_id) in btf__resolve_size() argument
37 t = btf_type_by_id(btf, type_id); in btf__resolve_size()
38 t = btf_resolve_size(btf, t, &size); in btf__resolve_size()
71 static bool is_flex_arr(const struct btf *btf, in is_flex_arr() argument
82 t = btf_type_by_id(btf, acc->type_id); in is_flex_arr()
146 int __bpf_core_types_are_compat(const struct btf *local_btf, __u32 local_id, in __bpf_core_types_are_compat()
147 const struct btf *targ_btf, __u32 targ_id, int level) in __bpf_core_types_are_compat()
263 int bpf_core_parse_spec(const char *prog_name, const struct btf *btf, in bpf_core_parse_spec() argument
274 spec_str = btf__name_by_offset(btf, relo->access_str_off); in bpf_core_parse_spec()
279 spec->btf = btf; in bpf_core_parse_spec()
305 t = skip_mods_and_typedefs(btf, relo->type_id, &id); in bpf_core_parse_spec()
322 acc->name = btf__name_by_offset(btf, name_off); in bpf_core_parse_spec()
329 sz = btf__resolve_size(btf, id); in bpf_core_parse_spec()
335 t = skip_mods_and_typedefs(btf, id, &id); in bpf_core_parse_spec()
354 name = btf__name_by_offset(btf, m->name_off); in bpf_core_parse_spec()
369 t = skip_mods_and_typedefs(btf, a->type, &id); in bpf_core_parse_spec()
373 flex = is_flex_arr(btf, acc - 1, a); in bpf_core_parse_spec()
381 sz = btf__resolve_size(btf, id); in bpf_core_parse_spec()
412 static int bpf_core_fields_are_compat(const struct btf *local_btf, in bpf_core_fields_are_compat()
414 const struct btf *targ_btf, in bpf_core_fields_are_compat()
481 static int bpf_core_match_member(const struct btf *local_btf, in bpf_core_match_member()
483 const struct btf *targ_btf, in bpf_core_match_member()
558 const struct btf *targ_btf, __u32 targ_id, in bpf_core_spec_match()
568 targ_spec->btf = targ_btf; in bpf_core_spec_match()
574 return bpf_core_types_match(local_spec->btf, in bpf_core_spec_match()
578 return bpf_core_types_are_compat(local_spec->btf, in bpf_core_spec_match()
591 targ_type = skip_mods_and_typedefs(targ_spec->btf, targ_id, &targ_id); in bpf_core_spec_match()
603 targ_name = btf__name_by_offset(targ_spec->btf, name_off); in bpf_core_spec_match()
624 targ_type = skip_mods_and_typedefs(targ_spec->btf, targ_id, in bpf_core_spec_match()
630 matched = bpf_core_match_member(local_spec->btf, in bpf_core_spec_match()
703 t = btf_type_by_id(spec->btf, acc->type_id); in bpf_core_calc_field_relo()
710 sz = btf__resolve_size(spec->btf, acc->type_id); in bpf_core_calc_field_relo()
716 sz = btf__resolve_size(spec->btf, acc->type_id); in bpf_core_calc_field_relo()
731 mt = skip_mods_and_typedefs(spec->btf, m->type, &field_type_id); in bpf_core_calc_field_relo()
751 sz = btf__resolve_size(spec->btf, field_type_id); in bpf_core_calc_field_relo()
833 sz = btf__resolve_size(spec->btf, spec->root_type_id); in bpf_core_calc_type_relo()
860 t = btf_type_by_id(spec->btf, spec->spec[0].type_id); in bpf_core_calc_enumval_relo()
913 orig_t = btf_type_by_id(local_spec->btf, res->orig_type_id); in bpf_core_calc_relo()
914 new_t = btf_type_by_id(targ_spec->btf, res->new_type_id); in bpf_core_calc_relo()
1175 t = btf_type_by_id(spec->btf, type_id); in bpf_core_format_spec()
1176 s = btf__name_by_offset(spec->btf, t->name_off); in bpf_core_format_spec()
1186 t = skip_mods_and_typedefs(spec->btf, type_id, NULL); in bpf_core_format_spec()
1192 s = btf__name_by_offset(spec->btf, e->name_off); in bpf_core_format_spec()
1200 s = btf__name_by_offset(spec->btf, e->name_off); in bpf_core_format_spec()
1283 const struct btf *local_btf, in bpf_core_calc_relo_insn()
1338 err = bpf_core_spec_match(local_spec, cands->cands[i].btf, in bpf_core_calc_relo_insn()
1422 static bool bpf_core_names_match(const struct btf *local_btf, size_t local_name_off, in bpf_core_names_match()
1423 const struct btf *targ_btf, size_t targ_name_off) in bpf_core_names_match()
1440 static int bpf_core_enums_match(const struct btf *local_btf, const struct btf_type *local_t, in bpf_core_enums_match()
1441 const struct btf *targ_btf, const struct btf_type *targ_t) in bpf_core_enums_match()
1479 static int bpf_core_composites_match(const struct btf *local_btf, const struct btf_type *local_t, in bpf_core_composites_match()
1480 const struct btf *targ_btf, const struct btf_type *targ_t, in bpf_core_composites_match()
1544 int __bpf_core_types_match(const struct btf *local_btf, __u32 local_id, const struct btf *targ_btf, in __bpf_core_types_match()