Lines Matching refs:bpf_object

75 static struct bpf_map *bpf_object__add_map(struct bpf_object *obj);
271 struct bpf_object *obj;
405 struct bpf_object { struct
478 static const char *elf_sym_str(const struct bpf_object *obj, size_t off); argument
479 static const char *elf_sec_str(const struct bpf_object *obj, size_t off);
480 static Elf_Scn *elf_sec_by_idx(const struct bpf_object *obj, size_t idx);
481 static Elf_Scn *elf_sec_by_name(const struct bpf_object *obj, const char *name);
482 static int elf_sec_hdr(const struct bpf_object *obj, Elf_Scn *scn, GElf_Shdr *hdr);
483 static const char *elf_sec_name(const struct bpf_object *obj, Elf_Scn *scn);
484 static Elf_Data *elf_sec_data(const struct bpf_object *obj, Elf_Scn *scn);
485 static int elf_sym_by_sec_off(const struct bpf_object *obj, size_t sec_idx,
559 bpf_object__init_prog(struct bpf_object *obj, struct bpf_program *prog, in bpf_object__init_prog()
609 bpf_object__add_programs(struct bpf_object *obj, Elf_Data *sec_data, in bpf_object__add_programs()
916 static int bpf_object__init_kern_struct_ops_maps(struct bpf_object *obj) in bpf_object__init_kern_struct_ops_maps()
937 static int bpf_object__init_struct_ops_maps(struct bpf_object *obj) in bpf_object__init_struct_ops_maps()
1030 static struct bpf_object *bpf_object__new(const char *path, in bpf_object__new()
1035 struct bpf_object *obj; in bpf_object__new()
1038 obj = calloc(1, sizeof(struct bpf_object) + strlen(path) + 1); in bpf_object__new()
1083 static void bpf_object__elf_finish(struct bpf_object *obj) in bpf_object__elf_finish()
1110 static int bpf_object__elf_init(struct bpf_object *obj) in bpf_object__elf_init()
1183 static int bpf_object__check_endianness(struct bpf_object *obj) in bpf_object__check_endianness()
1199 bpf_object__init_license(struct bpf_object *obj, void *data, size_t size) in bpf_object__init_license()
1207 bpf_object__init_kversion(struct bpf_object *obj, void *data, size_t size) in bpf_object__init_kversion()
1229 int bpf_object__section_size(const struct bpf_object *obj, const char *name, in bpf_object__section_size()
1262 int bpf_object__variable_offset(const struct bpf_object *obj, const char *name, in bpf_object__variable_offset()
1296 static struct bpf_map *bpf_object__add_map(struct bpf_object *obj) in bpf_object__add_map()
1340 static char *internal_map_name(struct bpf_object *obj, in internal_map_name()
1361 bpf_object__init_internal_map(struct bpf_object *obj, enum libbpf_map_type type, in bpf_object__init_internal_map()
1411 static int bpf_object__init_global_data_maps(struct bpf_object *obj) in bpf_object__init_global_data_maps()
1448 static struct extern_desc *find_extern_by_name(const struct bpf_object *obj, in find_extern_by_name()
1594 static int bpf_object__process_kconfig_line(struct bpf_object *obj, in bpf_object__process_kconfig_line()
1655 static int bpf_object__read_kconfig_file(struct bpf_object *obj, void *data) in bpf_object__read_kconfig_file()
1693 static int bpf_object__read_kconfig_mem(struct bpf_object *obj, in bpf_object__read_kconfig_mem()
1720 static int bpf_object__init_kconfig_map(struct bpf_object *obj) in bpf_object__init_kconfig_map()
1747 static int bpf_object__init_user_maps(struct bpf_object *obj, bool strict) in bpf_object__init_user_maps()
1979 static int parse_btf_map_def(struct bpf_object *obj, in parse_btf_map_def()
2215 static int bpf_object__init_user_btf_map(struct bpf_object *obj, in bpf_object__init_user_btf_map()
2282 static int bpf_object__init_user_btf_maps(struct bpf_object *obj, bool strict, in bpf_object__init_user_btf_maps()
2334 static int bpf_object__init_maps(struct bpf_object *obj, in bpf_object__init_maps()
2355 static bool section_have_execinstr(struct bpf_object *obj, int idx) in section_have_execinstr()
2365 static bool btf_needs_sanitization(struct bpf_object *obj) in btf_needs_sanitization()
2374 static void bpf_object__sanitize_btf(struct bpf_object *obj, struct btf *btf) in bpf_object__sanitize_btf()
2434 static bool libbpf_needs_btf(const struct bpf_object *obj) in libbpf_needs_btf()
2441 static bool kernel_needs_btf(const struct bpf_object *obj) in kernel_needs_btf()
2446 static int bpf_object__init_btf(struct bpf_object *obj, in bpf_object__init_btf()
2488 static int bpf_object__finalize_btf(struct bpf_object *obj) in bpf_object__finalize_btf()
2519 static int bpf_object__load_vmlinux_btf(struct bpf_object *obj) in bpf_object__load_vmlinux_btf()
2562 static int bpf_object__sanitize_and_load_btf(struct bpf_object *obj) in bpf_object__sanitize_and_load_btf()
2617 static const char *elf_sym_str(const struct bpf_object *obj, size_t off) in elf_sym_str()
2631 static const char *elf_sec_str(const struct bpf_object *obj, size_t off) in elf_sec_str()
2645 static Elf_Scn *elf_sec_by_idx(const struct bpf_object *obj, size_t idx) in elf_sec_by_idx()
2658 static Elf_Scn *elf_sec_by_name(const struct bpf_object *obj, const char *name) in elf_sec_by_name()
2677 static int elf_sec_hdr(const struct bpf_object *obj, Elf_Scn *scn, GElf_Shdr *hdr) in elf_sec_hdr()
2691 static const char *elf_sec_name(const struct bpf_object *obj, Elf_Scn *scn) in elf_sec_name()
2712 static Elf_Data *elf_sec_data(const struct bpf_object *obj, Elf_Scn *scn) in elf_sec_data()
2730 static int elf_sym_by_sec_off(const struct bpf_object *obj, size_t sec_idx, in elf_sym_by_sec_off()
2802 static int bpf_object__elf_collect(struct bpf_object *obj) in bpf_object__elf_collect()
3086 static int bpf_object__collect_externs(struct bpf_object *obj) in bpf_object__collect_externs()
3260 bpf_object__find_program_by_title(const struct bpf_object *obj, in bpf_object__find_program_by_title()
3272 static bool prog_is_subprog(const struct bpf_object *obj, in prog_is_subprog()
3291 bpf_object__find_program_by_name(const struct bpf_object *obj, in bpf_object__find_program_by_name()
3305 static bool bpf_object__shndx_is_data(const struct bpf_object *obj, in bpf_object__shndx_is_data()
3313 static bool bpf_object__shndx_is_maps(const struct bpf_object *obj, in bpf_object__shndx_is_maps()
3321 bpf_object__section_to_libbpf_map_type(const struct bpf_object *obj, int shndx) in bpf_object__section_to_libbpf_map_type()
3342 struct bpf_object *obj = prog->obj; in bpf_program__record_reloc()
3476 static struct bpf_program *find_prog_by_sec_insn(const struct bpf_object *obj, in find_prog_by_sec_insn()
3502 bpf_object__collect_prog_relos(struct bpf_object *obj, GElf_Shdr *shdr, Elf_Data *data) in bpf_object__collect_prog_relos()
3581 static int bpf_map_find_btf_info(struct bpf_object *obj, struct bpf_map *map) in bpf_map_find_btf_info()
3735 bpf_object__probe_loading(struct bpf_object *obj) in bpf_object__probe_loading()
4138 bpf_object__populate_internal_map(struct bpf_object *obj, struct bpf_map *map) in bpf_object__populate_internal_map()
4169 static int bpf_object__create_map(struct bpf_object *obj, struct bpf_map *map) in bpf_object__create_map()
4286 bpf_object__create_maps(struct bpf_object *obj) in bpf_object__create_maps()
5891 bpf_object__relocate_core(struct bpf_object *obj, const char *targ_btf_path) in bpf_object__relocate_core()
6001 bpf_object__relocate_data(struct bpf_object *obj, struct bpf_program *prog) in bpf_object__relocate_data()
6052 static int adjust_prog_btf_ext_info(const struct bpf_object *obj, in adjust_prog_btf_ext_info()
6122 reloc_prog_func_and_line_info(const struct bpf_object *obj, in reloc_prog_func_and_line_info()
6210 bpf_object__reloc_code(struct bpf_object *obj, struct bpf_program *main_prog, in bpf_object__reloc_code()
6397 bpf_object__relocate_calls(struct bpf_object *obj, struct bpf_program *prog) in bpf_object__relocate_calls()
6425 bpf_object__relocate(struct bpf_object *obj, const char *targ_btf_path) in bpf_object__relocate()
6481 static int bpf_object__collect_st_ops_relos(struct bpf_object *obj,
6484 static int bpf_object__collect_map_relos(struct bpf_object *obj, in bpf_object__collect_map_relos()
6612 static int bpf_object__collect_relos(struct bpf_object *obj) in bpf_object__collect_relos()
6660 static int bpf_object__sanitize_prog(struct bpf_object* obj, struct bpf_program *prog) in bpf_object__sanitize_prog()
6907 bpf_object__load_progs(struct bpf_object *obj, int log_level) in bpf_object__load_progs()
6938 static struct bpf_object *
6944 struct bpf_object *obj; in __bpf_object__open()
7016 static struct bpf_object *
7031 struct bpf_object *bpf_object__open_xattr(struct bpf_object_open_attr *attr) in bpf_object__open_xattr()
7036 struct bpf_object *bpf_object__open(const char *path) in bpf_object__open()
7046 struct bpf_object *
7057 struct bpf_object *
7067 struct bpf_object *
7084 int bpf_object__unload(struct bpf_object *obj) in bpf_object__unload()
7103 static int bpf_object__sanitize_maps(struct bpf_object *obj) in bpf_object__sanitize_maps()
7121 static int bpf_object__read_kallsyms_file(struct bpf_object *obj) in bpf_object__read_kallsyms_file()
7169 static int bpf_object__resolve_ksyms_btf_id(struct bpf_object *obj) in bpf_object__resolve_ksyms_btf_id()
7230 static int bpf_object__resolve_externs(struct bpf_object *obj, in bpf_object__resolve_externs()
7319 struct bpf_object *obj; in bpf_object__load_xattr()
7363 int bpf_object__load(struct bpf_object *obj) in bpf_object__load()
7731 int bpf_object__pin_maps(struct bpf_object *obj, const char *path) in bpf_object__pin_maps()
7784 int bpf_object__unpin_maps(struct bpf_object *obj, const char *path) in bpf_object__unpin_maps()
7819 int bpf_object__pin_programs(struct bpf_object *obj, const char *path) in bpf_object__pin_programs()
7871 int bpf_object__unpin_programs(struct bpf_object *obj, const char *path) in bpf_object__unpin_programs()
7898 int bpf_object__pin(struct bpf_object *obj, const char *path) in bpf_object__pin()
7949 void bpf_object__close(struct bpf_object *obj) in bpf_object__close()
7984 struct bpf_object *
7985 bpf_object__next(struct bpf_object *prev) in bpf_object__next()
7987 struct bpf_object *next; in bpf_object__next()
7991 struct bpf_object, in bpf_object__next()
8003 const char *bpf_object__name(const struct bpf_object *obj) in bpf_object__name()
8008 unsigned int bpf_object__kversion(const struct bpf_object *obj) in bpf_object__kversion()
8013 struct btf *bpf_object__btf(const struct bpf_object *obj) in bpf_object__btf()
8018 int bpf_object__btf_fd(const struct bpf_object *obj) in bpf_object__btf_fd()
8023 int bpf_object__set_priv(struct bpf_object *obj, void *priv, in bpf_object__set_priv()
8034 void *bpf_object__priv(const struct bpf_object *obj) in bpf_object__priv()
8040 __bpf_program__iter(const struct bpf_program *p, const struct bpf_object *obj, in __bpf_program__iter()
8066 bpf_program__next(struct bpf_program *prev, const struct bpf_object *obj) in bpf_program__next()
8078 bpf_program__prev(struct bpf_program *next, const struct bpf_object *obj) in bpf_program__prev()
8535 static struct bpf_map *find_struct_ops_map_by_offset(struct bpf_object *obj, in find_struct_ops_map_by_offset()
8554 static int bpf_object__collect_st_ops_relos(struct bpf_object *obj, in bpf_object__collect_st_ops_relos()
8979 __bpf_map__iter(const struct bpf_map *m, const struct bpf_object *obj, int i) in __bpf_map__iter()
9003 bpf_map__next(const struct bpf_map *prev, const struct bpf_object *obj) in bpf_map__next()
9012 bpf_map__prev(const struct bpf_map *next, const struct bpf_object *obj) in bpf_map__prev()
9024 bpf_object__find_map_by_name(const struct bpf_object *obj, const char *name) in bpf_object__find_map_by_name()
9036 bpf_object__find_map_fd_by_name(const struct bpf_object *obj, const char *name) in bpf_object__find_map_fd_by_name()
9042 bpf_object__find_map_by_offset(struct bpf_object *obj, size_t offset) in bpf_object__find_map_by_offset()
9053 struct bpf_object **pobj, int *prog_fd) in bpf_prog_load()
9066 struct bpf_object **pobj, int *prog_fd) in bpf_prog_load_xattr()
9070 struct bpf_object *obj; in bpf_prog_load_xattr()
10791 struct bpf_object *obj; in bpf_object__open_skeleton()