Lines Matching refs:bpf_object

71 static struct bpf_map *bpf_object__add_map(struct bpf_object *obj);
72 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog);
434 struct bpf_object *obj;
504 struct bpf_object *obj;
631 struct bpf_object { struct
689 static const char *elf_sym_str(const struct bpf_object *obj, size_t off); argument
690 static const char *elf_sec_str(const struct bpf_object *obj, size_t off);
691 static Elf_Scn *elf_sec_by_idx(const struct bpf_object *obj, size_t idx);
692 static Elf_Scn *elf_sec_by_name(const struct bpf_object *obj, const char *name);
693 static Elf64_Shdr *elf_sec_hdr(const struct bpf_object *obj, Elf_Scn *scn);
694 static const char *elf_sec_name(const struct bpf_object *obj, Elf_Scn *scn);
695 static Elf_Data *elf_sec_data(const struct bpf_object *obj, Elf_Scn *scn);
696 static Elf64_Sym *elf_sym_by_idx(const struct bpf_object *obj, size_t idx);
747 bpf_object__init_prog(struct bpf_object *obj, struct bpf_program *prog, in bpf_object__init_prog()
807 bpf_object__add_programs(struct bpf_object *obj, Elf_Data *sec_data, in bpf_object__add_programs()
1119 static int bpf_object__init_kern_struct_ops_maps(struct bpf_object *obj) in bpf_object__init_kern_struct_ops_maps()
1140 static int init_struct_ops_maps(struct bpf_object *obj, const char *sec_name, in init_struct_ops_maps()
1235 static int bpf_object_init_struct_ops(struct bpf_object *obj) in bpf_object_init_struct_ops()
1248 static struct bpf_object *bpf_object__new(const char *path, in bpf_object__new()
1253 struct bpf_object *obj; in bpf_object__new()
1256 obj = calloc(1, sizeof(struct bpf_object) + strlen(path) + 1); in bpf_object__new()
1293 static void bpf_object__elf_finish(struct bpf_object *obj) in bpf_object__elf_finish()
1311 static int bpf_object__elf_init(struct bpf_object *obj) in bpf_object__elf_init()
1394 static int bpf_object__check_endianness(struct bpf_object *obj) in bpf_object__check_endianness()
1410 bpf_object__init_license(struct bpf_object *obj, void *data, size_t size) in bpf_object__init_license()
1425 bpf_object__init_kversion(struct bpf_object *obj, void *data, size_t size) in bpf_object__init_kversion()
1447 static int find_elf_sec_sz(const struct bpf_object *obj, const char *name, __u32 *size) in find_elf_sec_sz()
1465 static Elf64_Sym *find_elf_var_sym(const struct bpf_object *obj, const char *name) in find_elf_var_sym()
1493 static struct bpf_map *bpf_object__add_map(struct bpf_object *obj) in bpf_object__add_map()
1542 static char *internal_map_name(struct bpf_object *obj, const char *real_name) in internal_map_name()
1601 map_fill_btf_type_info(struct bpf_object *obj, struct bpf_map *map);
1608 static bool map_is_mmapable(struct bpf_object *obj, struct bpf_map *map) in map_is_mmapable()
1635 bpf_object__init_internal_map(struct bpf_object *obj, enum libbpf_map_type type, in bpf_object__init_internal_map()
1695 static int bpf_object__init_global_data_maps(struct bpf_object *obj) in bpf_object__init_global_data_maps()
1745 static struct extern_desc *find_extern_by_name(const struct bpf_object *obj, in find_extern_by_name()
1907 static int bpf_object__process_kconfig_line(struct bpf_object *obj, in bpf_object__process_kconfig_line()
1971 static int bpf_object__read_kconfig_file(struct bpf_object *obj, void *data) in bpf_object__read_kconfig_file()
2009 static int bpf_object__read_kconfig_mem(struct bpf_object *obj, in bpf_object__read_kconfig_mem()
2036 static int bpf_object__init_kconfig_map(struct bpf_object *obj) in bpf_object__init_kconfig_map()
2514 static int bpf_object__init_user_btf_map(struct bpf_object *obj, in bpf_object__init_user_btf_map()
2614 static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict, in bpf_object__init_user_btf_maps()
2666 static int bpf_object__init_maps(struct bpf_object *obj, in bpf_object__init_maps()
2684 static bool section_have_execinstr(struct bpf_object *obj, int idx) in section_have_execinstr()
2695 static bool btf_needs_sanitization(struct bpf_object *obj) in btf_needs_sanitization()
2709 static int bpf_object__sanitize_btf(struct bpf_object *obj, struct btf *btf) in bpf_object__sanitize_btf()
2809 static bool libbpf_needs_btf(const struct bpf_object *obj) in libbpf_needs_btf()
2817 static bool kernel_needs_btf(const struct bpf_object *obj) in kernel_needs_btf()
2822 static int bpf_object__init_btf(struct bpf_object *obj, in bpf_object__init_btf()
2910 static int btf_fixup_datasec(struct bpf_object *obj, struct btf *btf, in btf_fixup_datasec()
3003 static int bpf_object_fixup_btf(struct bpf_object *obj) in bpf_object_fixup_btf()
3044 static bool obj_needs_vmlinux_btf(const struct bpf_object *obj) in obj_needs_vmlinux_btf()
3074 static int bpf_object__load_vmlinux_btf(struct bpf_object *obj, bool force) in bpf_object__load_vmlinux_btf()
3095 static int bpf_object__sanitize_and_load_btf(struct bpf_object *obj) in bpf_object__sanitize_and_load_btf()
3200 static const char *elf_sym_str(const struct bpf_object *obj, size_t off) in elf_sym_str()
3214 static const char *elf_sec_str(const struct bpf_object *obj, size_t off) in elf_sec_str()
3228 static Elf_Scn *elf_sec_by_idx(const struct bpf_object *obj, size_t idx) in elf_sec_by_idx()
3241 static Elf_Scn *elf_sec_by_name(const struct bpf_object *obj, const char *name) in elf_sec_by_name()
3260 static Elf64_Shdr *elf_sec_hdr(const struct bpf_object *obj, Elf_Scn *scn) in elf_sec_hdr()
3277 static const char *elf_sec_name(const struct bpf_object *obj, Elf_Scn *scn) in elf_sec_name()
3299 static Elf_Data *elf_sec_data(const struct bpf_object *obj, Elf_Scn *scn) in elf_sec_data()
3317 static Elf64_Sym *elf_sym_by_idx(const struct bpf_object *obj, size_t idx) in elf_sym_by_idx()
3385 static int bpf_object__elf_collect(struct bpf_object *obj) in bpf_object__elf_collect()
3771 static int bpf_object__collect_externs(struct bpf_object *obj) in bpf_object__collect_externs()
3990 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog) in prog_is_subprog()
3996 bpf_object__find_program_by_name(const struct bpf_object *obj, in bpf_object__find_program_by_name()
4010 static bool bpf_object__shndx_is_data(const struct bpf_object *obj, in bpf_object__shndx_is_data()
4023 static bool bpf_object__shndx_is_maps(const struct bpf_object *obj, in bpf_object__shndx_is_maps()
4030 bpf_object__section_to_libbpf_map_type(const struct bpf_object *obj, int shndx) in bpf_object__section_to_libbpf_map_type()
4054 struct bpf_object *obj = prog->obj; in bpf_program__record_reloc()
4206 static struct bpf_program *find_prog_by_sec_insn(const struct bpf_object *obj, in find_prog_by_sec_insn()
4235 bpf_object__collect_prog_relos(struct bpf_object *obj, Elf64_Shdr *shdr, Elf_Data *data) in bpf_object__collect_prog_relos()
4332 static int map_fill_btf_type_info(struct bpf_object *obj, struct bpf_map *map) in map_fill_btf_type_info()
4502 bpf_object__probe_loading(struct bpf_object *obj) in bpf_object__probe_loading()
4968 bool kernel_supports(const struct bpf_object *obj, enum kern_feature_id feat_id) in kernel_supports()
5059 bpf_object__populate_internal_map(struct bpf_object *obj, struct bpf_map *map) in bpf_object__populate_internal_map()
5097 static int bpf_object__create_map(struct bpf_object *obj, struct bpf_map *map, bool is_inner) in bpf_object__create_map()
5200 static int init_map_in_map_slots(struct bpf_object *obj, struct bpf_map *map) in init_map_in_map_slots()
5236 static int init_prog_array_slots(struct bpf_object *obj, struct bpf_map *map) in init_prog_array_slots()
5269 static int bpf_object_init_prog_arrays(struct bpf_object *obj) in bpf_object_init_prog_arrays()
5308 bpf_object__create_maps(struct bpf_object *obj) in bpf_object__create_maps()
5501 static int load_module_btfs(struct bpf_object *obj) in load_module_btfs()
5598 bpf_core_find_cands(struct bpf_object *obj, const struct btf *local_btf, __u32 local_type_id) in bpf_core_find_cands()
5777 bpf_object__relocate_core(struct bpf_object *obj, const char *targ_btf_path) in bpf_object__relocate_core()
5955 bpf_object__relocate_data(struct bpf_object *obj, struct bpf_program *prog) in bpf_object__relocate_data()
6050 static int adjust_prog_btf_ext_info(const struct bpf_object *obj, in adjust_prog_btf_ext_info()
6119 reloc_prog_func_and_line_info(const struct bpf_object *obj, in reloc_prog_func_and_line_info()
6238 bpf_object__reloc_code(struct bpf_object *obj, struct bpf_program *main_prog, in bpf_object__reloc_code()
6446 bpf_object__relocate_calls(struct bpf_object *obj, struct bpf_program *prog) in bpf_object__relocate_calls()
6470 bpf_object__free_relocs(struct bpf_object *obj) in bpf_object__free_relocs()
6498 static void bpf_object__sort_relos(struct bpf_object *obj) in bpf_object__sort_relos()
6513 bpf_object__relocate(struct bpf_object *obj, const char *targ_btf_path) in bpf_object__relocate()
6590 static int bpf_object__collect_st_ops_relos(struct bpf_object *obj,
6593 static int bpf_object__collect_map_relos(struct bpf_object *obj, in bpf_object__collect_map_relos()
6730 static int bpf_object__collect_relos(struct bpf_object *obj) in bpf_object__collect_relos()
6779 static int bpf_object__sanitize_prog(struct bpf_object *obj, struct bpf_program *prog) in bpf_object__sanitize_prog()
6879 static int bpf_object_load_prog(struct bpf_object *obj, struct bpf_program *prog, in bpf_object_load_prog()
7149 struct bpf_object *obj = prog->obj; in fixup_log_missing_map_load()
7182 struct bpf_object *obj = prog->obj; in fixup_log_missing_kfunc_call()
7255 struct bpf_object *obj = prog->obj; in bpf_program_record_relos()
7297 bpf_object__load_progs(struct bpf_object *obj, int log_level) in bpf_object__load_progs()
7337 static int bpf_object_init_progs(struct bpf_object *obj, const struct bpf_object_open_opts *opts) in bpf_object_init_progs()
7370 static struct bpf_object *bpf_object_open(const char *path, const void *obj_buf, size_t obj_buf_sz, in bpf_object_open()
7374 struct bpf_object *obj; in bpf_object_open()
7459 struct bpf_object *
7470 struct bpf_object *bpf_object__open(const char *path) in bpf_object__open()
7475 struct bpf_object *
7485 static int bpf_object_unload(struct bpf_object *obj) in bpf_object_unload()
7504 static int bpf_object__sanitize_maps(struct bpf_object *obj) in bpf_object__sanitize_maps()
7555 struct bpf_object *obj = ctx; in kallsyms_cb()
7580 static int bpf_object__read_kallsyms_file(struct bpf_object *obj) in bpf_object__read_kallsyms_file()
7585 static int find_ksym_btf_id(struct bpf_object *obj, const char *ksym_name, in find_ksym_btf_id()
7619 static int bpf_object__resolve_ksym_var_btf_id(struct bpf_object *obj, in bpf_object__resolve_ksym_var_btf_id()
7672 static int bpf_object__resolve_ksym_func_btf_id(struct bpf_object *obj, in bpf_object__resolve_ksym_func_btf_id()
7744 static int bpf_object__resolve_ksyms_btf_id(struct bpf_object *obj) in bpf_object__resolve_ksyms_btf_id()
7772 static int bpf_object__resolve_externs(struct bpf_object *obj, in bpf_object__resolve_externs()
7902 static int bpf_object_prepare_struct_ops(struct bpf_object *obj) in bpf_object_prepare_struct_ops()
7913 static int bpf_object_load(struct bpf_object *obj, int extra_log_level, const char *target_btf_path) in bpf_object_load()
7982 int bpf_object__load(struct bpf_object *obj) in bpf_object__load()
8224 int bpf_object__pin_maps(struct bpf_object *obj, const char *path) in bpf_object__pin_maps()
8272 int bpf_object__unpin_maps(struct bpf_object *obj, const char *path) in bpf_object__unpin_maps()
8302 int bpf_object__pin_programs(struct bpf_object *obj, const char *path) in bpf_object__pin_programs()
8339 int bpf_object__unpin_programs(struct bpf_object *obj, const char *path) in bpf_object__unpin_programs()
8362 int bpf_object__pin(struct bpf_object *obj, const char *path) in bpf_object__pin()
8379 int bpf_object__unpin(struct bpf_object *obj, const char *path) in bpf_object__unpin()
8427 void bpf_object__close(struct bpf_object *obj) in bpf_object__close()
8468 const char *bpf_object__name(const struct bpf_object *obj) in bpf_object__name()
8473 unsigned int bpf_object__kversion(const struct bpf_object *obj) in bpf_object__kversion()
8478 struct btf *bpf_object__btf(const struct bpf_object *obj) in bpf_object__btf()
8483 int bpf_object__btf_fd(const struct bpf_object *obj) in bpf_object__btf_fd()
8488 int bpf_object__set_kversion(struct bpf_object *obj, __u32 kern_version) in bpf_object__set_kversion()
8498 int bpf_object__gen_loader(struct bpf_object *obj, struct gen_loader_opts *opts) in bpf_object__gen_loader()
8515 __bpf_program__iter(const struct bpf_program *p, const struct bpf_object *obj, in __bpf_program__iter()
8541 bpf_object__next_program(const struct bpf_object *obj, struct bpf_program *prev) in bpf_object__next_program()
8553 bpf_object__prev_program(const struct bpf_object *obj, struct bpf_program *next) in bpf_object__prev_program()
9098 static struct bpf_map *find_struct_ops_map_by_offset(struct bpf_object *obj, in find_struct_ops_map_by_offset()
9119 static int bpf_object__collect_st_ops_relos(struct bpf_object *obj, in bpf_object__collect_st_ops_relos()
9349 static int find_kernel_btf_id(struct bpf_object *obj, const char *attach_name, in find_kernel_btf_id()
9724 __bpf_map__iter(const struct bpf_map *m, const struct bpf_object *obj, int i) in __bpf_map__iter()
9748 bpf_object__next_map(const struct bpf_object *obj, const struct bpf_map *prev) in bpf_object__next_map()
9757 bpf_object__prev_map(const struct bpf_object *obj, const struct bpf_map *next) in bpf_object__prev_map()
9769 bpf_object__find_map_by_name(const struct bpf_object *obj, const char *name) in bpf_object__find_map_by_name()
9796 bpf_object__find_map_fd_by_name(const struct bpf_object *obj, const char *name) in bpf_object__find_map_fd_by_name()
11567 struct bpf_object *obj = prog->obj; in bpf_program__attach_usdt()
12946 static int populate_skeleton_maps(const struct bpf_object *obj, in populate_skeleton_maps()
12970 static int populate_skeleton_progs(const struct bpf_object *obj, in populate_skeleton_progs()
12995 struct bpf_object *obj; in bpf_object__open_skeleton()