Lines Matching defs:bpf_object

74 static struct bpf_map *bpf_object__add_map(struct bpf_object *obj);
75 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog);
447 struct bpf_object *obj;
520 struct bpf_object *obj;
648 struct bpf_object {
714 static const char *elf_sym_str(const struct bpf_object *obj, size_t off);
715 static const char *elf_sec_str(const struct bpf_object *obj, size_t off);
716 static Elf_Scn *elf_sec_by_idx(const struct bpf_object *obj, size_t idx);
717 static Elf_Scn *elf_sec_by_name(const struct bpf_object *obj, const char *name);
718 static Elf64_Shdr *elf_sec_hdr(const struct bpf_object *obj, Elf_Scn *scn);
719 static const char *elf_sec_name(const struct bpf_object *obj, Elf_Scn *scn);
720 static Elf_Data *elf_sec_data(const struct bpf_object *obj, Elf_Scn *scn);
721 static Elf64_Sym *elf_sym_by_idx(const struct bpf_object *obj, size_t idx);
772 bpf_object__init_prog(struct bpf_object *obj, struct bpf_program *prog,
833 bpf_object__add_programs(struct bpf_object *obj, Elf_Data *sec_data,
948 static int find_ksym_btf_id(struct bpf_object *obj, const char *ksym_name,
957 find_struct_ops_kern_types(struct bpf_object *obj, const char *tname_raw,
1027 static bool is_valid_st_ops_program(struct bpf_object *obj,
1045 static int bpf_object_adjust_struct_ops_autoload(struct bpf_object *obj)
1088 struct bpf_object *obj = map->obj;
1251 static int bpf_object__init_kern_struct_ops_maps(struct bpf_object *obj)
1274 static int init_struct_ops_maps(struct bpf_object *obj, const char *sec_name,
1379 static int bpf_object_init_struct_ops(struct bpf_object *obj)
1402 static struct bpf_object *bpf_object__new(const char *path,
1407 struct bpf_object *obj;
1410 obj = calloc(1, sizeof(struct bpf_object) + strlen(path) + 1);
1445 static void bpf_object__elf_finish(struct bpf_object *obj)
1462 static int bpf_object__elf_init(struct bpf_object *obj)
1545 static int bpf_object__check_endianness(struct bpf_object *obj)
1561 bpf_object__init_license(struct bpf_object *obj, void *data, size_t size)
1576 bpf_object__init_kversion(struct bpf_object *obj, void *data, size_t size)
1598 static int find_elf_sec_sz(const struct bpf_object *obj, const char *name, __u32 *size)
1616 static Elf64_Sym *find_elf_var_sym(const struct bpf_object *obj, const char *name)
1667 static struct bpf_map *bpf_object__add_map(struct bpf_object *obj)
1744 static char *internal_map_name(struct bpf_object *obj, const char *real_name)
1754 * As an example, let's say we have bpf_object named 'my_object_name'
1777 * maps we use their ELF names as is, not prepending bpf_object name
1803 map_fill_btf_type_info(struct bpf_object *obj, struct bpf_map *map);
1810 static bool map_is_mmapable(struct bpf_object *obj, struct bpf_map *map)
1837 bpf_object__init_internal_map(struct bpf_object *obj, enum libbpf_map_type type,
1897 static int bpf_object__init_global_data_maps(struct bpf_object *obj)
1947 static struct extern_desc *find_extern_by_name(const struct bpf_object *obj,
2109 static int bpf_object__process_kconfig_line(struct bpf_object *obj,
2173 static int bpf_object__read_kconfig_file(struct bpf_object *obj, void *data)
2211 static int bpf_object__read_kconfig_mem(struct bpf_object *obj,
2238 static int bpf_object__init_kconfig_map(struct bpf_object *obj)
2756 static int bpf_object__init_user_btf_map(struct bpf_object *obj,
2858 static int init_arena_map_data(struct bpf_object *obj, struct bpf_map *map,
2884 static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict,
2963 static int bpf_object__init_maps(struct bpf_object *obj,
2981 static bool section_have_execinstr(struct bpf_object *obj, int idx)
2997 static bool btf_needs_sanitization(struct bpf_object *obj)
3012 static int bpf_object__sanitize_btf(struct bpf_object *obj, struct btf *btf)
3121 static bool libbpf_needs_btf(const struct bpf_object *obj)
3128 static bool kernel_needs_btf(const struct bpf_object *obj)
3133 static int bpf_object__init_btf(struct bpf_object *obj,
3221 static int btf_fixup_datasec(struct bpf_object *obj, struct btf *btf,
3314 static int bpf_object_fixup_btf(struct bpf_object *obj)
3360 static bool obj_needs_vmlinux_btf(const struct bpf_object *obj)
3396 static int bpf_object__load_vmlinux_btf(struct bpf_object *obj, bool force)
3417 static int bpf_object__sanitize_and_load_btf(struct bpf_object *obj)
3522 static const char *elf_sym_str(const struct bpf_object *obj, size_t off)
3536 static const char *elf_sec_str(const struct bpf_object *obj, size_t off)
3550 static Elf_Scn *elf_sec_by_idx(const struct bpf_object *obj, size_t idx)
3563 static Elf_Scn *elf_sec_by_name(const struct bpf_object *obj, const char *name)
3582 static Elf64_Shdr *elf_sec_hdr(const struct bpf_object *obj, Elf_Scn *scn)
3599 static const char *elf_sec_name(const struct bpf_object *obj, Elf_Scn *scn)
3621 static Elf_Data *elf_sec_data(const struct bpf_object *obj, Elf_Scn *scn)
3639 static Elf64_Sym *elf_sym_by_idx(const struct bpf_object *obj, size_t idx)
3707 static int bpf_object__elf_collect(struct bpf_object *obj)
4100 static int bpf_object__collect_externs(struct bpf_object *obj)
4319 static bool prog_is_subprog(const struct bpf_object *obj, const struct bpf_program *prog)
4325 bpf_object__find_program_by_name(const struct bpf_object *obj,
4339 static bool bpf_object__shndx_is_data(const struct bpf_object *obj,
4352 static bool bpf_object__shndx_is_maps(const struct bpf_object *obj,
4359 bpf_object__section_to_libbpf_map_type(const struct bpf_object *obj, int shndx)
4383 struct bpf_object *obj = prog->obj;
4544 static struct bpf_program *find_prog_by_sec_insn(const struct bpf_object *obj,
4573 bpf_object__collect_prog_relos(struct bpf_object *obj, Elf64_Shdr *shdr, Elf_Data *data)
4672 static int map_fill_btf_type_info(struct bpf_object *obj, struct bpf_map *map)
4837 static int bpf_object_prepare_token(struct bpf_object *obj)
4890 bpf_object__probe_loading(struct bpf_object *obj)
4928 bool kernel_supports(const struct bpf_object *obj, enum kern_feature_id feat_id)
5007 bpf_object__populate_internal_map(struct bpf_object *obj, struct bpf_map *map)
5051 static int bpf_object__create_map(struct bpf_object *obj, struct bpf_map *map, bool is_inner)
5182 static int init_map_in_map_slots(struct bpf_object *obj, struct bpf_map *map)
5218 static int init_prog_array_slots(struct bpf_object *obj, struct bpf_map *map)
5251 static int bpf_object_init_prog_arrays(struct bpf_object *obj)
5288 bpf_object__create_maps(struct bpf_object *obj)
5310 * bpf_object loading will succeed just fine even on old
5492 static int load_module_btfs(struct bpf_object *obj)
5589 bpf_core_find_cands(struct bpf_object *obj, const struct btf *local_btf, __u32 local_type_id)
5768 bpf_object__relocate_core(struct bpf_object *obj, const char *targ_btf_path)
5946 bpf_object__relocate_data(struct bpf_object *obj, struct bpf_program *prog)
6041 static int adjust_prog_btf_ext_info(const struct bpf_object *obj,
6110 reloc_prog_func_and_line_info(const struct bpf_object *obj,
6229 bpf_object__append_subprog_code(struct bpf_object *obj, struct bpf_program *main_prog,
6261 bpf_object__reloc_code(struct bpf_object *obj, struct bpf_program *main_prog,
6451 bpf_object__relocate_calls(struct bpf_object *obj, struct bpf_program *prog)
6475 bpf_object__free_relocs(struct bpf_object *obj)
6503 static void bpf_object__sort_relos(struct bpf_object *obj)
6517 static int bpf_prog_assign_exc_cb(struct bpf_object *obj, struct bpf_program *prog)
6779 static int bpf_program_fixup_func_info(struct bpf_object *obj, struct bpf_program *prog)
6918 static int bpf_object__relocate(struct bpf_object *obj, const char *targ_btf_path)
7026 static int bpf_object__collect_st_ops_relos(struct bpf_object *obj,
7029 static int bpf_object__collect_map_relos(struct bpf_object *obj,
7166 static int bpf_object__collect_relos(struct bpf_object *obj)
7215 static int bpf_object__sanitize_prog(struct bpf_object *obj, struct bpf_program *prog)
7315 static int bpf_object_load_prog(struct bpf_object *obj, struct bpf_program *prog,
7589 struct bpf_object *obj = prog->obj;
7622 struct bpf_object *obj = prog->obj;
7695 struct bpf_object *obj = prog->obj;
7737 bpf_object__load_progs(struct bpf_object *obj, int log_level)
7777 static int bpf_object_init_progs(struct bpf_object *obj, const struct bpf_object_open_opts *opts)
7810 static struct bpf_object *bpf_object_open(const char *path, const void *obj_buf, size_t obj_buf_sz,
7814 struct bpf_object *obj;
7917 struct bpf_object *
7928 struct bpf_object *bpf_object__open(const char *path)
7933 struct bpf_object *
7943 static int bpf_object_unload(struct bpf_object *obj)
7962 static int bpf_object__sanitize_maps(struct bpf_object *obj)
8013 struct bpf_object *obj = ctx;
8038 static int bpf_object__read_kallsyms_file(struct bpf_object *obj)
8043 static int find_ksym_btf_id(struct bpf_object *obj, const char *ksym_name,
8077 static int bpf_object__resolve_ksym_var_btf_id(struct bpf_object *obj,
8130 static int bpf_object__resolve_ksym_func_btf_id(struct bpf_object *obj,
8202 static int bpf_object__resolve_ksyms_btf_id(struct bpf_object *obj)
8230 static int bpf_object__resolve_externs(struct bpf_object *obj,
8360 static int bpf_object_prepare_struct_ops(struct bpf_object *obj)
8380 static int bpf_object_load(struct bpf_object *obj, int extra_log_level, const char *target_btf_path)
8449 int bpf_object__load(struct bpf_object *obj)
8691 int bpf_object__pin_maps(struct bpf_object *obj, const char *path)
8739 int bpf_object__unpin_maps(struct bpf_object *obj, const char *path)
8769 int bpf_object__pin_programs(struct bpf_object *obj, const char *path)
8806 int bpf_object__unpin_programs(struct bpf_object *obj, const char *path)
8829 int bpf_object__pin(struct bpf_object *obj, const char *path)
8846 int bpf_object__unpin(struct bpf_object *obj, const char *path)
8890 void bpf_object__close(struct bpf_object *obj)
8938 const char *bpf_object__name(const struct bpf_object *obj)
8943 unsigned int bpf_object__kversion(const struct bpf_object *obj)
8948 struct btf *bpf_object__btf(const struct bpf_object *obj)
8953 int bpf_object__btf_fd(const struct bpf_object *obj)
8958 int bpf_object__set_kversion(struct bpf_object *obj, __u32 kern_version)
8968 int bpf_object__gen_loader(struct bpf_object *obj, struct gen_loader_opts *opts)
8985 __bpf_program__iter(const struct bpf_program *p, const struct bpf_object *obj,
9011 bpf_object__next_program(const struct bpf_object *obj, struct bpf_program *prev)
9023 bpf_object__prev_program(const struct bpf_object *obj, struct bpf_program *next)
9575 static struct bpf_map *find_struct_ops_map_by_offset(struct bpf_object *obj,
9598 static int bpf_object__collect_st_ops_relos(struct bpf_object *obj,
9815 static int find_kernel_btf_id(struct bpf_object *obj, const char *attach_name,
10221 __bpf_map__iter(const struct bpf_map *m, const struct bpf_object *obj, int i)
10245 bpf_object__next_map(const struct bpf_object *obj, const struct bpf_map *prev)
10254 bpf_object__prev_map(const struct bpf_object *obj, const struct bpf_map *next)
10266 bpf_object__find_map_by_name(const struct bpf_object *obj, const char *name)
10293 bpf_object__find_map_fd_by_name(const struct bpf_object *obj, const char *name)
12074 struct bpf_object *obj = prog->obj;
13487 static int populate_skeleton_maps(const struct bpf_object *obj,
13511 static int populate_skeleton_progs(const struct bpf_object *obj,
13536 struct bpf_object *obj;