Home
last modified time | relevance | path

Searched refs:btf_ext (Results 1 – 7 of 7) sorted by relevance

/Linux-v5.15/tools/lib/bpf/
Dbtf.h23 struct btf_ext;
40 LIBBPF_API struct btf *btf__parse(const char *path, struct btf_ext **btf_ext);
42 LIBBPF_API struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext);
83 LIBBPF_API struct btf_ext *btf_ext__new(__u8 *data, __u32 size);
84 LIBBPF_API void btf_ext__free(struct btf_ext *btf_ext);
85 LIBBPF_API const void *btf_ext__get_raw_data(const struct btf_ext *btf_ext,
89 const struct btf_ext *btf_ext,
94 const struct btf_ext *btf_ext,
97 LIBBPF_API __u32 btf_ext__func_info_rec_size(const struct btf_ext *btf_ext);
98 LIBBPF_API __u32 btf_ext__line_info_rec_size(const struct btf_ext *btf_ext);
[all …]
Dbtf.c851 struct btf_ext **btf_ext) in btf_parse_elf() argument
920 } else if (btf_ext && strcmp(name, BTF_EXT_ELF_SEC) == 0) { in btf_parse_elf()
954 if (btf_ext && btf_ext_data) { in btf_parse_elf()
955 *btf_ext = btf_ext__new(btf_ext_data->d_buf, btf_ext_data->d_size); in btf_parse_elf()
956 err = libbpf_get_error(*btf_ext); in btf_parse_elf()
959 } else if (btf_ext) { in btf_parse_elf()
960 *btf_ext = NULL; in btf_parse_elf()
970 if (btf_ext) in btf_parse_elf()
971 btf_ext__free(*btf_ext); in btf_parse_elf()
977 struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext) in btf__parse_elf() argument
[all …]
Dlibbpf_internal.h350 struct btf_ext { struct
387 int btf_ext_visit_type_ids(struct btf_ext *btf_ext, type_id_visit_fn visit, void *ctx);
388 int btf_ext_visit_str_offs(struct btf_ext *btf_ext, str_off_visit_fn visit, void *ctx);
Dlinker.c60 struct btf_ext *btf_ext; member
149 struct btf_ext *btf_ext; member
199 btf_ext__free(linker->btf_ext); in bpf_linker__free()
462 btf_ext__free(obj.btf_ext); in bpf_linker__add_file()
666 obj->btf_ext = btf_ext__new(data->d_buf, shdr->sh_size); in linker_load_obj_file()
667 err = libbpf_get_error(obj->btf_ext); in linker_load_obj_file()
968 if (!obj->btf_ext) in linker_sanity_check_btf_ext()
975 err = err ?: btf_ext_visit_type_ids(obj->btf_ext, check_btf_type_id, obj->btf); in linker_sanity_check_btf_ext()
976 err = err ?: btf_ext_visit_str_offs(obj->btf_ext, check_btf_str_off, obj->btf); in linker_sanity_check_btf_ext()
2435 if (!obj->btf_ext) in linker_append_btf_ext()
[all …]
Dbtf_dump.c80 const struct btf_ext *btf_ext; member
149 const struct btf_ext *btf_ext, in btf_dump__new() argument
161 d->btf_ext = btf_ext; in btf_dump__new()
Dlibbpf.c497 struct btf_ext *btf_ext; member
2596 obj->btf_ext = btf_ext__new(btf_ext_data->d_buf, btf_ext_data->d_size); in bpf_object__init_btf()
2597 err = libbpf_get_error(obj->btf_ext); in bpf_object__init_btf()
2601 obj->btf_ext = NULL; in bpf_object__init_btf()
2652 if (obj->btf_ext && obj->btf_ext->core_relo_info.len && !obj->btf_custom_path) in obj_needs_vmlinux_btf()
5185 if (obj->btf_ext->core_relo_info.len == 0) in bpf_object__relocate_core()
5203 seg = &obj->btf_ext->core_relo_info; in bpf_object__relocate_core()
5431 if (!obj->btf_ext || !kernel_supports(obj, FEAT_BTF_FUNC)) in reloc_prog_func_and_line_info()
5440 err = adjust_prog_btf_ext_info(obj, prog, &obj->btf_ext->func_info, in reloc_prog_func_and_line_info()
5468 err = adjust_prog_btf_ext_info(obj, prog, &obj->btf_ext->line_info, in reloc_prog_func_and_line_info()
[all …]
/Linux-v5.15/tools/testing/selftests/bpf/prog_tests/
Dbtf.c4236 struct btf_ext *btf_ext = NULL; in do_test_file() local
4251 btf = btf__parse_elf(test->file, &btf_ext); in do_test_file()
4263 has_btf_ext = btf_ext != NULL; in do_test_file()
4264 btf_ext__free(btf_ext); in do_test_file()