Lines Matching defs: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);
435 struct bpf_object *obj;
505 struct bpf_object *obj;
632 struct bpf_object {
690 static const char *elf_sym_str(const struct bpf_object *obj, size_t off);
691 static const char *elf_sec_str(const struct bpf_object *obj, size_t off);
692 static Elf_Scn *elf_sec_by_idx(const struct bpf_object *obj, size_t idx);
693 static Elf_Scn *elf_sec_by_name(const struct bpf_object *obj, const char *name);
694 static Elf64_Shdr *elf_sec_hdr(const struct bpf_object *obj, Elf_Scn *scn);
695 static const char *elf_sec_name(const struct bpf_object *obj, Elf_Scn *scn);
696 static Elf_Data *elf_sec_data(const struct bpf_object *obj, Elf_Scn *scn);
697 static Elf64_Sym *elf_sym_by_idx(const struct bpf_object *obj, size_t idx);
748 bpf_object__init_prog(struct bpf_object *obj, struct bpf_program *prog,
808 bpf_object__add_programs(struct bpf_object *obj, Elf_Data *sec_data,
1120 static int bpf_object__init_kern_struct_ops_maps(struct bpf_object *obj)
1141 static int init_struct_ops_maps(struct bpf_object *obj, const char *sec_name,
1236 static int bpf_object_init_struct_ops(struct bpf_object *obj)
1249 static struct bpf_object *bpf_object__new(const char *path,
1254 struct bpf_object *obj;
1257 obj = calloc(1, sizeof(struct bpf_object) + strlen(path) + 1);
1294 static void bpf_object__elf_finish(struct bpf_object *obj)
1312 static int bpf_object__elf_init(struct bpf_object *obj)
1395 static int bpf_object__check_endianness(struct bpf_object *obj)
1411 bpf_object__init_license(struct bpf_object *obj, void *data, size_t size)
1426 bpf_object__init_kversion(struct bpf_object *obj, void *data, size_t size)
1448 static int find_elf_sec_sz(const struct bpf_object *obj, const char *name, __u32 *size)
1466 static Elf64_Sym *find_elf_var_sym(const struct bpf_object *obj, const char *name)
1494 static struct bpf_map *bpf_object__add_map(struct bpf_object *obj)
1543 static char *internal_map_name(struct bpf_object *obj, const char *real_name)
1553 * As an example, let's say we have bpf_object named 'my_object_name'
1576 * maps we use their ELF names as is, not prepending bpf_object name
1602 map_fill_btf_type_info(struct bpf_object *obj, struct bpf_map *map);
1609 static bool map_is_mmapable(struct bpf_object *obj, struct bpf_map *map)
1636 bpf_object__init_internal_map(struct bpf_object *obj, enum libbpf_map_type type,
1696 static int bpf_object__init_global_data_maps(struct bpf_object *obj)
1746 static struct extern_desc *find_extern_by_name(const struct bpf_object *obj,
1908 static int bpf_object__process_kconfig_line(struct bpf_object *obj,
1972 static int bpf_object__read_kconfig_file(struct bpf_object *obj, void *data)
2010 static int bpf_object__read_kconfig_mem(struct bpf_object *obj,
2037 static int bpf_object__init_kconfig_map(struct bpf_object *obj)
2515 static int bpf_object__init_user_btf_map(struct bpf_object *obj,
2615 static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict,
2667 static int bpf_object__init_maps(struct bpf_object *obj,
2685 static bool section_have_execinstr(struct bpf_object *obj, int idx)
2696 static bool btf_needs_sanitization(struct bpf_object *obj)
2710 static int bpf_object__sanitize_btf(struct bpf_object *obj, struct btf *btf)
2810 static bool libbpf_needs_btf(const struct bpf_object *obj)
2818 static bool kernel_needs_btf(const struct bpf_object *obj)
2823 static int bpf_object__init_btf(struct bpf_object *obj,
2911 static int btf_fixup_datasec(struct bpf_object *obj, struct btf *btf,
3004 static int bpf_object_fixup_btf(struct bpf_object *obj)
3045 static bool obj_needs_vmlinux_btf(const struct bpf_object *obj)
3075 static int bpf_object__load_vmlinux_btf(struct bpf_object *obj, bool force)
3096 static int bpf_object__sanitize_and_load_btf(struct bpf_object *obj)
3201 static const char *elf_sym_str(const struct bpf_object *obj, size_t off)
3215 static const char *elf_sec_str(const struct bpf_object *obj, size_t off)
3229 static Elf_Scn *elf_sec_by_idx(const struct bpf_object *obj, size_t idx)
3242 static Elf_Scn *elf_sec_by_name(const struct bpf_object *obj, const char *name)
3261 static Elf64_Shdr *elf_sec_hdr(const struct bpf_object *obj, Elf_Scn *scn)
3278 static const char *elf_sec_name(const struct bpf_object *obj, Elf_Scn *scn)
3300 static Elf_Data *elf_sec_data(const struct bpf_object *obj, Elf_Scn *scn)
3318 static Elf64_Sym *elf_sym_by_idx(const struct bpf_object *obj, size_t idx)
3386 static int bpf_object__elf_collect(struct bpf_object *obj)
3772 static int bpf_object__collect_externs(struct bpf_object *obj)
3991 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog)
3997 bpf_object__find_program_by_name(const struct bpf_object *obj,
4011 static bool bpf_object__shndx_is_data(const struct bpf_object *obj,
4024 static bool bpf_object__shndx_is_maps(const struct bpf_object *obj,
4031 bpf_object__section_to_libbpf_map_type(const struct bpf_object *obj, int shndx)
4055 struct bpf_object *obj = prog->obj;
4207 static struct bpf_program *find_prog_by_sec_insn(const struct bpf_object *obj,
4236 bpf_object__collect_prog_relos(struct bpf_object *obj, Elf64_Shdr *shdr, Elf_Data *data)
4335 static int map_fill_btf_type_info(struct bpf_object *obj, struct bpf_map *map)
4505 bpf_object__probe_loading(struct bpf_object *obj)
4971 bool kernel_supports(const struct bpf_object *obj, enum kern_feature_id feat_id)
5062 bpf_object__populate_internal_map(struct bpf_object *obj, struct bpf_map *map)
5100 static int bpf_object__create_map(struct bpf_object *obj, struct bpf_map *map, bool is_inner)
5206 static int init_map_in_map_slots(struct bpf_object *obj, struct bpf_map *map)
5242 static int init_prog_array_slots(struct bpf_object *obj, struct bpf_map *map)
5275 static int bpf_object_init_prog_arrays(struct bpf_object *obj)
5314 bpf_object__create_maps(struct bpf_object *obj)
5336 * bpf_object loading will succeed just fine even on old
5507 static int load_module_btfs(struct bpf_object *obj)
5604 bpf_core_find_cands(struct bpf_object *obj, const struct btf *local_btf, __u32 local_type_id)
5783 bpf_object__relocate_core(struct bpf_object *obj, const char *targ_btf_path)
5961 bpf_object__relocate_data(struct bpf_object *obj, struct bpf_program *prog)
6056 static int adjust_prog_btf_ext_info(const struct bpf_object *obj,
6125 reloc_prog_func_and_line_info(const struct bpf_object *obj,
6244 bpf_object__reloc_code(struct bpf_object *obj, struct bpf_program *main_prog,
6452 bpf_object__relocate_calls(struct bpf_object *obj, struct bpf_program *prog)
6476 bpf_object__free_relocs(struct bpf_object *obj)
6504 static void bpf_object__sort_relos(struct bpf_object *obj)
6519 bpf_object__relocate(struct bpf_object *obj, const char *targ_btf_path)
6596 static int bpf_object__collect_st_ops_relos(struct bpf_object *obj,
6599 static int bpf_object__collect_map_relos(struct bpf_object *obj,
6736 static int bpf_object__collect_relos(struct bpf_object *obj)
6785 static int bpf_object__sanitize_prog(struct bpf_object *obj, struct bpf_program *prog)
6885 static int bpf_object_load_prog(struct bpf_object *obj, struct bpf_program *prog,
7155 struct bpf_object *obj = prog->obj;
7188 struct bpf_object *obj = prog->obj;
7261 struct bpf_object *obj = prog->obj;
7303 bpf_object__load_progs(struct bpf_object *obj, int log_level)
7343 static int bpf_object_init_progs(struct bpf_object *obj, const struct bpf_object_open_opts *opts)
7376 static struct bpf_object *bpf_object_open(const char *path, const void *obj_buf, size_t obj_buf_sz,
7380 struct bpf_object *obj;
7465 struct bpf_object *
7476 struct bpf_object *bpf_object__open(const char *path)
7481 struct bpf_object *
7491 static int bpf_object_unload(struct bpf_object *obj)
7510 static int bpf_object__sanitize_maps(struct bpf_object *obj)
7561 struct bpf_object *obj = ctx;
7586 static int bpf_object__read_kallsyms_file(struct bpf_object *obj)
7591 static int find_ksym_btf_id(struct bpf_object *obj, const char *ksym_name,
7625 static int bpf_object__resolve_ksym_var_btf_id(struct bpf_object *obj,
7678 static int bpf_object__resolve_ksym_func_btf_id(struct bpf_object *obj,
7750 static int bpf_object__resolve_ksyms_btf_id(struct bpf_object *obj)
7778 static int bpf_object__resolve_externs(struct bpf_object *obj,
7908 static int bpf_object_prepare_struct_ops(struct bpf_object *obj)
7919 static int bpf_object_load(struct bpf_object *obj, int extra_log_level, const char *target_btf_path)
7988 int bpf_object__load(struct bpf_object *obj)
8230 int bpf_object__pin_maps(struct bpf_object *obj, const char *path)
8278 int bpf_object__unpin_maps(struct bpf_object *obj, const char *path)
8308 int bpf_object__pin_programs(struct bpf_object *obj, const char *path)
8345 int bpf_object__unpin_programs(struct bpf_object *obj, const char *path)
8368 int bpf_object__pin(struct bpf_object *obj, const char *path)
8385 int bpf_object__unpin(struct bpf_object *obj, const char *path)
8433 void bpf_object__close(struct bpf_object *obj)
8474 const char *bpf_object__name(const struct bpf_object *obj)
8479 unsigned int bpf_object__kversion(const struct bpf_object *obj)
8484 struct btf *bpf_object__btf(const struct bpf_object *obj)
8489 int bpf_object__btf_fd(const struct bpf_object *obj)
8494 int bpf_object__set_kversion(struct bpf_object *obj, __u32 kern_version)
8504 int bpf_object__gen_loader(struct bpf_object *obj, struct gen_loader_opts *opts)
8521 __bpf_program__iter(const struct bpf_program *p, const struct bpf_object *obj,
8547 bpf_object__next_program(const struct bpf_object *obj, struct bpf_program *prev)
8559 bpf_object__prev_program(const struct bpf_object *obj, struct bpf_program *next)
9104 static struct bpf_map *find_struct_ops_map_by_offset(struct bpf_object *obj,
9125 static int bpf_object__collect_st_ops_relos(struct bpf_object *obj,
9355 static int find_kernel_btf_id(struct bpf_object *obj, const char *attach_name,
9730 __bpf_map__iter(const struct bpf_map *m, const struct bpf_object *obj, int i)
9754 bpf_object__next_map(const struct bpf_object *obj, const struct bpf_map *prev)
9763 bpf_object__prev_map(const struct bpf_object *obj, const struct bpf_map *next)
9775 bpf_object__find_map_by_name(const struct bpf_object *obj, const char *name)
9802 bpf_object__find_map_fd_by_name(const struct bpf_object *obj, const char *name)
11573 struct bpf_object *obj = prog->obj;
12952 static int populate_skeleton_maps(const struct bpf_object *obj,
12976 static int populate_skeleton_progs(const struct bpf_object *obj,
13001 struct bpf_object *obj;