/kernel/linux/linux-5.10/tools/lib/bpf/ |
H A D | btf.h | 23 struct btf_ext; 36 LIBBPF_API struct btf *btf__parse(const char *path, struct btf_ext **btf_ext); 37 LIBBPF_API struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext); 66 LIBBPF_API struct btf_ext *btf_ext__new(__u8 *data, __u32 size); 67 LIBBPF_API void btf_ext__free(struct btf_ext *btf_ext); 68 LIBBPF_API const void *btf_ext__get_raw_data(const struct btf_ext *btf_ext, [all...] |
H A D | btf.c | 803 struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext) in btf__parse_elf() argument 864 } else if (btf_ext && strcmp(name, BTF_EXT_ELF_SEC) == 0) { in btf__parse_elf() 897 if (btf_ext && btf_ext_data) { in btf__parse_elf() 898 *btf_ext = btf_ext__new(btf_ext_data->d_buf, in btf__parse_elf() 900 if (IS_ERR(*btf_ext)) in btf__parse_elf() 902 } else if (btf_ext) { in btf__parse_elf() 903 *btf_ext = NULL; in btf__parse_elf() 913 * btf is always parsed before btf_ext, so no need to clean up in btf__parse_elf() 914 * btf_ext, i in btf__parse_elf() 989 btf__parse(const char *path, struct btf_ext **btf_ext) btf__parse() argument 2346 btf_ext_setup_info(struct btf_ext *btf_ext, struct btf_ext_sec_setup_param *ext_sec) btf_ext_setup_info() argument 2435 btf_ext_setup_func_info(struct btf_ext *btf_ext) btf_ext_setup_func_info() argument 2448 btf_ext_setup_line_info(struct btf_ext *btf_ext) btf_ext_setup_line_info() argument 2461 btf_ext_setup_core_relos(struct btf_ext *btf_ext) btf_ext_setup_core_relos() argument 2510 btf_ext__free(struct btf_ext *btf_ext) btf_ext__free() argument 2520 struct btf_ext *btf_ext; btf_ext__new() local 2565 btf_ext__get_raw_data(const struct btf_ext *btf_ext, __u32 *size) btf_ext__get_raw_data() argument 2619 btf_ext__reloc_func_info(const struct btf *btf, const struct btf_ext *btf_ext, const char *sec_name, __u32 insns_cnt, void **func_info, __u32 *cnt) btf_ext__reloc_func_info() argument 2628 btf_ext__reloc_line_info(const struct btf *btf, const struct btf_ext *btf_ext, const char *sec_name, __u32 insns_cnt, void **line_info, __u32 *cnt) btf_ext__reloc_line_info() argument 2637 btf_ext__func_info_rec_size(const struct btf_ext *btf_ext) btf_ext__func_info_rec_size() argument 2642 btf_ext__line_info_rec_size(const struct btf_ext *btf_ext) btf_ext__line_info_rec_size() argument 2796 btf__dedup(struct btf *btf, struct btf_ext *btf_ext, const struct btf_dedup_opts *opts) btf__dedup() argument 2856 struct btf_ext *btf_ext; global() member 2961 btf_dedup_new(struct btf *btf, struct btf_ext *btf_ext, const struct btf_dedup_opts *opts) btf_dedup_new() argument [all...] |
H A D | btf_dump.c | 58 const struct btf_ext *btf_ext; member 122 const struct btf_ext *btf_ext, in btf_dump__new() 134 d->btf_ext = btf_ext; in btf_dump__new() 121 btf_dump__new(const struct btf *btf, const struct btf_ext *btf_ext, const struct btf_dump_opts *opts, btf_dump_printf_fn_t printf_fn) btf_dump__new() argument
|
H A D | libbpf_internal.h | 218 struct btf_ext { struct
|
H A D | libbpf.c | 469 struct btf_ext *btf_ext; member 2471 obj->btf_ext = btf_ext__new(btf_ext_data->d_buf, in bpf_object__init_btf() 2473 if (IS_ERR(obj->btf_ext)) { in bpf_object__init_btf() 2475 BTF_EXT_ELF_SEC, PTR_ERR(obj->btf_ext)); in bpf_object__init_btf() 2476 obj->btf_ext = NULL; in bpf_object__init_btf() 2526 if (obj->btf_ext && obj->btf_ext->core_relo_info.len) in bpf_object__load_vmlinux_btf() 5906 if (obj->btf_ext->core_relo_info.len == 0) in bpf_object__relocate_core() 5924 seg = &obj->btf_ext in bpf_object__relocate_core() [all...] |
/kernel/linux/linux-6.6/tools/lib/bpf/ |
H A D | btf.c | 923 struct btf_ext **btf_ext) in btf_parse_elf() 992 } else if (btf_ext && strcmp(name, BTF_EXT_ELF_SEC) == 0) { in btf_parse_elf() 1025 if (btf_ext && btf_ext_data) { in btf_parse_elf() 1026 *btf_ext = btf_ext__new(btf_ext_data->d_buf, btf_ext_data->d_size); in btf_parse_elf() 1027 err = libbpf_get_error(*btf_ext); in btf_parse_elf() 1030 } else if (btf_ext) { in btf_parse_elf() 1031 *btf_ext = NULL; in btf_parse_elf() 1041 if (btf_ext) in btf_parse_elf() 1042 btf_ext__free(*btf_ext); in btf_parse_elf() 922 btf_parse_elf(const char *path, struct btf *base_btf, struct btf_ext **btf_ext) btf_parse_elf() argument 1048 btf__parse_elf(const char *path, struct btf_ext **btf_ext) btf__parse_elf() argument 1131 btf_parse(const char *path, struct btf *base_btf, struct btf_ext **btf_ext) btf_parse() argument 1148 btf__parse(const char *path, struct btf_ext **btf_ext) btf__parse() argument 2655 btf_ext_setup_info(struct btf_ext *btf_ext, struct btf_ext_sec_setup_param *ext_sec) btf_ext_setup_info() argument 2746 btf_ext_setup_func_info(struct btf_ext *btf_ext) btf_ext_setup_func_info() argument 2759 btf_ext_setup_line_info(struct btf_ext *btf_ext) btf_ext_setup_line_info() argument 2772 btf_ext_setup_core_relos(struct btf_ext *btf_ext) btf_ext_setup_core_relos() argument 2821 btf_ext__free(struct btf_ext *btf_ext) btf_ext__free() argument 2834 struct btf_ext *btf_ext; btf_ext__new() local 2882 btf_ext__get_raw_data(const struct btf_ext *btf_ext, __u32 *size) btf_ext__get_raw_data() argument 3114 struct btf_ext *btf_ext; global() member 4947 btf_ext_visit_type_ids(struct btf_ext *btf_ext, type_id_visit_fn visit, void *ctx) btf_ext_visit_type_ids() argument 4978 btf_ext_visit_str_offs(struct btf_ext *btf_ext, str_off_visit_fn visit, void *ctx) btf_ext_visit_str_offs() argument [all...] |
H A D | btf.h | 24 struct btf_ext; 110 LIBBPF_API struct btf *btf__parse(const char *path, struct btf_ext **btf_ext); 112 LIBBPF_API struct btf *btf__parse_elf(const char *path, struct btf_ext **btf_ext); 145 LIBBPF_API struct btf_ext *btf_ext__new(const __u8 *data, __u32 size); 146 LIBBPF_API void btf_ext__free(struct btf_ext *btf_ext); 147 LIBBPF_API const void *btf_ext__raw_data(const struct btf_ext *btf_ext, __u3 225 struct btf_ext *btf_ext; global() member [all...] |
H A D | libbpf_legacy.h | 126 struct btf_ext; 134 LIBBPF_API const void *btf_ext__get_raw_data(const struct btf_ext *btf_ext, __u32 *size);
|
H A D | linker.c | 59 struct btf_ext *btf_ext; member 148 struct btf_ext *btf_ext; member 198 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() 963 if (!obj->btf_ext) in linker_sanity_check_btf_ext() 970 err = err ?: btf_ext_visit_type_ids(obj->btf_ext, check_btf_type_i in linker_sanity_check_btf_ext() [all...] |
H A D | libbpf_internal.h | 457 struct btf_ext { struct 494 int btf_ext_visit_type_ids(struct btf_ext *btf_ext, type_id_visit_fn visit, void *ctx); 495 int btf_ext_visit_str_offs(struct btf_ext *btf_ext, str_off_visit_fn visit, void *ctx);
|
H A D | libbpf.c | 658 struct btf_ext *btf_ext; member 2849 obj->btf_ext = btf_ext__new(btf_ext_data->d_buf, btf_ext_data->d_size); in bpf_object__init_btf() 2850 err = libbpf_get_error(obj->btf_ext); in bpf_object__init_btf() 2854 obj->btf_ext = NULL; in bpf_object__init_btf() 2859 ext_segs[0] = &obj->btf_ext->func_info; in bpf_object__init_btf() 2860 ext_segs[1] = &obj->btf_ext->line_info; in bpf_object__init_btf() 2861 ext_segs[2] = &obj->btf_ext->core_relo_info; in bpf_object__init_btf() 3053 if (obj->btf_ext && obj->btf_ext in obj_needs_vmlinux_btf() [all...] |
/kernel/linux/linux-6.6/tools/bpf/bpftool/ |
H A D | gen.c | 2048 struct btf_ext *btf_ext = NULL; in btfgen_record_obj() local 2054 btf = btf__parse(obj_path, &btf_ext); in btfgen_record_obj() 2061 if (!btf_ext) { in btfgen_record_obj() 2068 if (btf_ext->core_relo_info.len == 0) { in btfgen_record_obj() 2079 seg = &btf_ext->core_relo_info; in btfgen_record_obj() 2115 btf_ext__free(btf_ext); in btfgen_record_obj()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
H A D | btf.c | 4113 struct btf_ext *btf_ext = NULL; in do_test_file() local 4128 btf = btf__parse_elf(test->file, &btf_ext); in do_test_file() 4139 has_btf_ext = btf_ext != NULL; in do_test_file() 4140 btf_ext__free(btf_ext); in do_test_file()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | btf.c | 4754 struct btf_ext *btf_ext = NULL; in do_test_file() local 4769 btf = btf__parse_elf(test->file, &btf_ext); in do_test_file() 4781 has_btf_ext = btf_ext != NULL; in do_test_file() 4782 btf_ext__free(btf_ext); in do_test_file()
|