Lines Matching refs:reloc_desc
374 struct reloc_desc { struct
464 struct reloc_desc *reloc_desc; member
768 zfree(&prog->reloc_desc); in bpf_program__exit()
4448 struct reloc_desc *reloc_desc, in bpf_program__record_reloc() argument
4484 reloc_desc->type = RELO_EXTERN_CALL; in bpf_program__record_reloc()
4486 reloc_desc->type = RELO_EXTERN_LD64; in bpf_program__record_reloc()
4487 reloc_desc->insn_idx = insn_idx; in bpf_program__record_reloc()
4488 reloc_desc->ext_idx = i; in bpf_program__record_reloc()
4510 reloc_desc->type = RELO_CALL; in bpf_program__record_reloc()
4511 reloc_desc->insn_idx = insn_idx; in bpf_program__record_reloc()
4512 reloc_desc->sym_off = sym->st_value; in bpf_program__record_reloc()
4533 reloc_desc->type = RELO_SUBPROG_ADDR; in bpf_program__record_reloc()
4534 reloc_desc->insn_idx = insn_idx; in bpf_program__record_reloc()
4535 reloc_desc->sym_off = sym->st_value; in bpf_program__record_reloc()
4544 reloc_desc->type = RELO_DATA; in bpf_program__record_reloc()
4545 reloc_desc->insn_idx = insn_idx; in bpf_program__record_reloc()
4546 reloc_desc->map_idx = obj->arena_map - obj->maps; in bpf_program__record_reloc()
4547 reloc_desc->sym_off = sym->st_value; in bpf_program__record_reloc()
4574 reloc_desc->type = RELO_LD64; in bpf_program__record_reloc()
4575 reloc_desc->insn_idx = insn_idx; in bpf_program__record_reloc()
4576 reloc_desc->map_idx = map_idx; in bpf_program__record_reloc()
4577 reloc_desc->sym_off = 0; /* sym->st_value determines map_idx */ in bpf_program__record_reloc()
4602 reloc_desc->type = RELO_DATA; in bpf_program__record_reloc()
4603 reloc_desc->insn_idx = insn_idx; in bpf_program__record_reloc()
4604 reloc_desc->map_idx = map_idx; in bpf_program__record_reloc()
4605 reloc_desc->sym_off = sym->st_value; in bpf_program__record_reloc()
4649 struct reloc_desc *relos; in bpf_object__collect_prog_relos()
4725 relos = libbpf_reallocarray(prog->reloc_desc, in bpf_object__collect_prog_relos()
4729 prog->reloc_desc = relos; in bpf_object__collect_prog_relos()
5778 struct reloc_desc *relos, *relo; in record_relo_core()
5780 relos = libbpf_reallocarray(prog->reloc_desc, in record_relo_core()
5788 prog->reloc_desc = relos; in record_relo_core()
5795 struct reloc_desc *relo; in find_relo_core()
5799 relo = &prog->reloc_desc[i]; in find_relo_core()
6036 struct reloc_desc *relo = &prog->reloc_desc[i]; in bpf_object__relocate_data()
6269 const struct reloc_desc *relo = elem; in cmp_relo_by_insn_idx()
6276 static struct reloc_desc *find_prog_insn_relo(const struct bpf_program *prog, size_t insn_idx) in find_prog_insn_relo()
6280 return bsearch(&insn_idx, prog->reloc_desc, prog->nr_reloc, in find_prog_insn_relo()
6281 sizeof(*prog->reloc_desc), cmp_relo_by_insn_idx); in find_prog_insn_relo()
6287 struct reloc_desc *relos; in append_subprog_relos()
6292 relos = libbpf_reallocarray(main_prog->reloc_desc, new_cnt, sizeof(*relos)); in append_subprog_relos()
6300 memcpy(relos + main_prog->nr_reloc, subprog->reloc_desc, in append_subprog_relos()
6308 main_prog->reloc_desc = relos; in append_subprog_relos()
6351 struct reloc_desc *relo; in bpf_object__reloc_code()
6568 zfree(&prog->reloc_desc); in bpf_object__free_relocs()
6575 const struct reloc_desc *a = _a; in cmp_relocs()
6576 const struct reloc_desc *b = _b; in cmp_relocs()
6598 qsort(p->reloc_desc, p->nr_reloc, sizeof(*p->reloc_desc), cmp_relocs); in bpf_object__sort_relos()
7029 struct reloc_desc *relo = &prog->reloc_desc[j]; in bpf_object__relocate()
7796 struct reloc_desc *relo = &prog->reloc_desc[i]; in bpf_program_record_relos()