Lines Matching refs:bpf_object
75 static struct bpf_map *bpf_object__add_map(struct bpf_object *obj);
76 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog);
446 struct bpf_object *obj;
518 struct bpf_object *obj;
659 struct bpf_object {
717 static const char *elf_sym_str(const struct bpf_object *obj, size_t off);
718 static const char *elf_sec_str(const struct bpf_object *obj, size_t off);
720 static Elf_Scn *elf_sec_by_idx(const struct bpf_object *obj, size_t idx);
721 static Elf_Scn *elf_sec_by_name(const struct bpf_object *obj, const char *name);
724 static Elf64_Shdr *elf_sec_hdr(const struct bpf_object *obj, Elf_Scn *scn);
726 static Elf64_Shdr *elf_sec_hdr_by_idx(const struct bpf_object *obj, size_t idx, Elf64_Shdr *sheader);
729 static const char *elf_sec_name(const struct bpf_object *obj, Elf_Scn *scn);
731 static const char *elf_sec_name_by_idx(const struct bpf_object *obj, size_t idx);
734 static Elf_Data *elf_sec_data(const struct bpf_object *obj, Elf_Scn *scn);
736 static Elf_Data *elf_sec_data_by_name(const struct bpf_object *obj, const char *name, Elf_Data *data);
737 static Elf_Data *elf_sec_data_by_idx(const struct bpf_object *obj, size_t idx, Elf_Data *data);
739 static Elf64_Sym *elf_sym_by_idx(const struct bpf_object *obj, size_t idx);
790 bpf_object__init_prog(struct bpf_object *obj, struct bpf_program *prog,
851 bpf_object__add_programs(struct bpf_object *obj, Elf_Data *sec_data,
1165 static int bpf_object__init_kern_struct_ops_maps(struct bpf_object *obj)
1186 static int init_struct_ops_maps(struct bpf_object *obj, const char *sec_name,
1281 static int bpf_object_init_struct_ops(struct bpf_object *obj)
1294 static struct bpf_object *bpf_object__new(const char *path,
1299 struct bpf_object *obj;
1302 obj = calloc(1, sizeof(struct bpf_object) + strlen(path) + 1);
1339 static void bpf_object__elf_finish(struct bpf_object *obj)
1366 static int bpf_object__elf_init(struct bpf_object *obj)
1473 static int bpf_object__check_endianness(struct bpf_object *obj)
1489 bpf_object__init_license(struct bpf_object *obj, void *data, size_t size)
1504 bpf_object__init_kversion(struct bpf_object *obj, void *data, size_t size)
1526 static int find_elf_sec_sz(const struct bpf_object *obj, const char *name, __u32 *size)
1551 static Elf64_Sym *find_elf_var_sym(const struct bpf_object *obj, const char *name)
1579 static struct bpf_map *bpf_object__add_map(struct bpf_object *obj)
1628 static char *internal_map_name(struct bpf_object *obj, const char *real_name)
1638 * As an example, let's say we have bpf_object named 'my_object_name'
1661 * maps we use their ELF names as is, not prepending bpf_object name
1687 map_fill_btf_type_info(struct bpf_object *obj, struct bpf_map *map);
1694 static bool map_is_mmapable(struct bpf_object *obj, struct bpf_map *map)
1721 bpf_object__init_internal_map(struct bpf_object *obj, enum libbpf_map_type type,
1781 static int bpf_object__init_global_data_maps(struct bpf_object *obj)
1843 static struct extern_desc *find_extern_by_name(const struct bpf_object *obj,
2005 static int bpf_object__process_kconfig_line(struct bpf_object *obj,
2069 static int bpf_object__read_kconfig_file(struct bpf_object *obj, void *data)
2107 static int bpf_object__read_kconfig_mem(struct bpf_object *obj,
2134 static int bpf_object__init_kconfig_map(struct bpf_object *obj)
2612 static int bpf_object__init_user_btf_map(struct bpf_object *obj,
2712 static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict,
2771 static int bpf_object__init_maps(struct bpf_object *obj,
2789 static bool section_have_execinstr(struct bpf_object *obj, int idx)
2804 static bool btf_needs_sanitization(struct bpf_object *obj)
2818 static int bpf_object__sanitize_btf(struct bpf_object *obj, struct btf *btf)
2918 static bool libbpf_needs_btf(const struct bpf_object *obj)
2926 static bool kernel_needs_btf(const struct bpf_object *obj)
2931 static int bpf_object__init_btf(struct bpf_object *obj,
3033 static int btf_fixup_datasec(struct bpf_object *obj, struct btf *btf,
3126 static int bpf_object_fixup_btf(struct bpf_object *obj)
3167 static bool obj_needs_vmlinux_btf(const struct bpf_object *obj)
3197 static int bpf_object__load_vmlinux_btf(struct bpf_object *obj, bool force)
3218 static int bpf_object__sanitize_and_load_btf(struct bpf_object *obj)
3403 static const char *elf_sym_str(const struct bpf_object *obj, size_t off)
3420 static const char *elf_sec_str(const struct bpf_object *obj, size_t off)
3439 static Elf_Scn *elf_sec_by_idx(const struct bpf_object *obj, size_t idx)
3452 static Elf_Scn *elf_sec_by_name(const struct bpf_object *obj, const char *name)
3471 static Elf64_Shdr *elf_sec_hdr(const struct bpf_object *obj, Elf_Scn *scn)
3488 static const char *elf_sec_name(const struct bpf_object *obj, Elf_Scn *scn)
3510 static Elf64_Shdr *elf_sec_hdr_by_idx(const struct bpf_object *obj, size_t idx, Elf64_Shdr *sheader)
3528 static const char *elf_sec_name_by_idx(const struct bpf_object *obj, size_t idx)
3547 static Elf_Data *elf_sec_data(const struct bpf_object *obj, Elf_Scn *scn)
3565 static Elf_Data *elf_sec_data_by_name(const struct bpf_object *obj, const char *name, Elf_Data *data)
3575 static Elf_Data *elf_sec_data_by_idx(const struct bpf_object *obj, size_t idx, Elf_Data *data)
3586 static Elf64_Sym *elf_sym_by_idx(const struct bpf_object *obj, size_t idx)
3654 static int bpf_object__elf_collect(struct bpf_object *obj)
4147 static int bpf_object__collect_externs(struct bpf_object *obj)
4375 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog)
4381 bpf_object__find_program_by_name(const struct bpf_object *obj,
4395 static bool bpf_object__shndx_is_data(const struct bpf_object *obj,
4408 static bool bpf_object__shndx_is_maps(const struct bpf_object *obj,
4415 bpf_object__section_to_libbpf_map_type(const struct bpf_object *obj, int shndx)
4439 struct bpf_object *obj = prog->obj;
4598 static struct bpf_program *find_prog_by_sec_insn(const struct bpf_object *obj,
4627 bpf_object__collect_prog_relos(struct bpf_object *obj, Elf64_Shdr *shdr, Elf_Data *data)
4740 static int map_fill_btf_type_info(struct bpf_object *obj, struct bpf_map *map)
4910 bpf_object__probe_loading(struct bpf_object *obj)
5376 bool kernel_supports(const struct bpf_object *obj, enum kern_feature_id feat_id)
5467 bpf_object__populate_internal_map(struct bpf_object *obj, struct bpf_map *map)
5505 static int bpf_object__create_map(struct bpf_object *obj, struct bpf_map *map, bool is_inner)
5609 static int init_map_in_map_slots(struct bpf_object *obj, struct bpf_map *map)
5645 static int init_prog_array_slots(struct bpf_object *obj, struct bpf_map *map)
5678 static int bpf_object_init_prog_arrays(struct bpf_object *obj)
5717 bpf_object__create_maps(struct bpf_object *obj)
5739 * bpf_object loading will succeed just fine even on old
5910 static int load_module_btfs(struct bpf_object *obj)
6007 bpf_core_find_cands(struct bpf_object *obj, const struct btf *local_btf, __u32 local_type_id)
6186 bpf_object__relocate_core(struct bpf_object *obj, const char *targ_btf_path)
6366 bpf_object__relocate_data(struct bpf_object *obj, struct bpf_program *prog)
6461 static int adjust_prog_btf_ext_info(const struct bpf_object *obj,
6530 reloc_prog_func_and_line_info(const struct bpf_object *obj,
6649 bpf_object__append_subprog_code(struct bpf_object *obj, struct bpf_program *main_prog,
6681 bpf_object__reloc_code(struct bpf_object *obj, struct bpf_program *main_prog,
6871 bpf_object__relocate_calls(struct bpf_object *obj, struct bpf_program *prog)
6895 bpf_object__free_relocs(struct bpf_object *obj)
6923 static void bpf_object__sort_relos(struct bpf_object *obj)
6938 bpf_object__relocate(struct bpf_object *obj, const char *targ_btf_path)
7034 static int bpf_object__collect_st_ops_relos(struct bpf_object *obj,
7037 static int bpf_object__collect_map_relos(struct bpf_object *obj,
7174 static int bpf_object__collect_relos(struct bpf_object *obj)
7228 static int bpf_object__sanitize_prog(struct bpf_object *obj, struct bpf_program *prog)
7328 static int bpf_object_load_prog(struct bpf_object *obj, struct bpf_program *prog,
7598 struct bpf_object *obj = prog->obj;
7631 struct bpf_object *obj = prog->obj;
7704 struct bpf_object *obj = prog->obj;
7746 bpf_object__load_progs(struct bpf_object *obj, int log_level)
7786 static int bpf_object_init_progs(struct bpf_object *obj, const struct bpf_object_open_opts *opts)
7819 static struct bpf_object *bpf_object_open(const char *path, const void *obj_buf, size_t obj_buf_sz,
7823 struct bpf_object *obj;
7910 struct bpf_object *
7921 struct bpf_object *bpf_object__open(const char *path)
7926 struct bpf_object *
7936 static int bpf_object_unload(struct bpf_object *obj)
7955 static int bpf_object__sanitize_maps(struct bpf_object *obj)
8006 struct bpf_object *obj = ctx;
8031 static int bpf_object__read_kallsyms_file(struct bpf_object *obj)
8036 static int find_ksym_btf_id(struct bpf_object *obj, const char *ksym_name,
8070 static int bpf_object__resolve_ksym_var_btf_id(struct bpf_object *obj,
8123 static int bpf_object__resolve_ksym_func_btf_id(struct bpf_object *obj,
8195 static int bpf_object__resolve_ksyms_btf_id(struct bpf_object *obj)
8223 static int bpf_object__resolve_externs(struct bpf_object *obj,
8353 static int bpf_object_prepare_struct_ops(struct bpf_object *obj)
8364 static int bpf_object_load(struct bpf_object *obj, int extra_log_level, const char *target_btf_path)
8433 int bpf_object__load(struct bpf_object *obj)
8675 int bpf_object__pin_maps(struct bpf_object *obj, const char *path)
8723 int bpf_object__unpin_maps(struct bpf_object *obj, const char *path)
8753 int bpf_object__pin_programs(struct bpf_object *obj, const char *path)
8790 int bpf_object__unpin_programs(struct bpf_object *obj, const char *path)
8813 int bpf_object__pin(struct bpf_object *obj, const char *path)
8830 int bpf_object__unpin(struct bpf_object *obj, const char *path)
8878 void bpf_object__close(struct bpf_object *obj)
8919 const char *bpf_object__name(const struct bpf_object *obj)
8924 unsigned int bpf_object__kversion(const struct bpf_object *obj)
8929 struct btf *bpf_object__btf(const struct bpf_object *obj)
8934 int bpf_object__btf_fd(const struct bpf_object *obj)
8939 int bpf_object__set_kversion(struct bpf_object *obj, __u32 kern_version)
8949 int bpf_object__gen_loader(struct bpf_object *obj, struct gen_loader_opts *opts)
8966 __bpf_program__iter(const struct bpf_program *p, const struct bpf_object *obj,
8992 bpf_object__next_program(const struct bpf_object *obj, struct bpf_program *prev)
9004 bpf_object__prev_program(const struct bpf_object *obj, struct bpf_program *next)
9560 static struct bpf_map *find_struct_ops_map_by_offset(struct bpf_object *obj,
9581 static int bpf_object__collect_st_ops_relos(struct bpf_object *obj,
9811 static int find_kernel_btf_id(struct bpf_object *obj, const char *attach_name,
10186 __bpf_map__iter(const struct bpf_map *m, const struct bpf_object *obj, int i)
10210 bpf_object__next_map(const struct bpf_object *obj, const struct bpf_map *prev)
10219 bpf_object__prev_map(const struct bpf_object *obj, const struct bpf_map *next)
10231 bpf_object__find_map_by_name(const struct bpf_object *obj, const char *name)
10258 bpf_object__find_map_fd_by_name(const struct bpf_object *obj, const char *name)
12050 struct bpf_object *obj = prog->obj;
13466 static int populate_skeleton_maps(const struct bpf_object *obj,
13490 static int populate_skeleton_progs(const struct bpf_object *obj,
13515 struct bpf_object *obj;