Lines Matching refs:reloc_desc
323 struct reloc_desc { struct
409 struct reloc_desc *reloc_desc; member
698 zfree(&prog->reloc_desc); in bpf_program__exit()
3945 struct reloc_desc *reloc_desc, in bpf_program__record_reloc() argument
3981 reloc_desc->type = RELO_EXTERN_FUNC; in bpf_program__record_reloc()
3983 reloc_desc->type = RELO_EXTERN_VAR; in bpf_program__record_reloc()
3984 reloc_desc->insn_idx = insn_idx; in bpf_program__record_reloc()
3985 reloc_desc->sym_off = i; /* sym_off stores extern index */ in bpf_program__record_reloc()
4007 reloc_desc->type = RELO_CALL; in bpf_program__record_reloc()
4008 reloc_desc->insn_idx = insn_idx; in bpf_program__record_reloc()
4009 reloc_desc->sym_off = sym->st_value; in bpf_program__record_reloc()
4030 reloc_desc->type = RELO_SUBPROG_ADDR; in bpf_program__record_reloc()
4031 reloc_desc->insn_idx = insn_idx; in bpf_program__record_reloc()
4032 reloc_desc->sym_off = sym->st_value; in bpf_program__record_reloc()
4062 reloc_desc->type = RELO_LD64; in bpf_program__record_reloc()
4063 reloc_desc->insn_idx = insn_idx; in bpf_program__record_reloc()
4064 reloc_desc->map_idx = map_idx; in bpf_program__record_reloc()
4065 reloc_desc->sym_off = 0; /* sym->st_value determines map_idx */ in bpf_program__record_reloc()
4090 reloc_desc->type = RELO_DATA; in bpf_program__record_reloc()
4091 reloc_desc->insn_idx = insn_idx; in bpf_program__record_reloc()
4092 reloc_desc->map_idx = map_idx; in bpf_program__record_reloc()
4093 reloc_desc->sym_off = sym->st_value; in bpf_program__record_reloc()
4134 struct reloc_desc *relos; in bpf_object__collect_prog_relos()
4208 relos = libbpf_reallocarray(prog->reloc_desc, in bpf_object__collect_prog_relos()
4212 prog->reloc_desc = relos; in bpf_object__collect_prog_relos()
5562 struct reloc_desc *relos, *relo; in record_relo_core()
5564 relos = libbpf_reallocarray(prog->reloc_desc, in record_relo_core()
5572 prog->reloc_desc = relos; in record_relo_core()
5579 struct reloc_desc *relo; in find_relo_core()
5583 relo = &prog->reloc_desc[i]; in find_relo_core()
5797 struct reloc_desc *relo = &prog->reloc_desc[i]; in bpf_object__relocate_data()
6030 const struct reloc_desc *relo = elem; in cmp_relo_by_insn_idx()
6037 static struct reloc_desc *find_prog_insn_relo(const struct bpf_program *prog, size_t insn_idx) in find_prog_insn_relo()
6041 return bsearch(&insn_idx, prog->reloc_desc, prog->nr_reloc, in find_prog_insn_relo()
6042 sizeof(*prog->reloc_desc), cmp_relo_by_insn_idx); in find_prog_insn_relo()
6048 struct reloc_desc *relos; in append_subprog_relos()
6053 relos = libbpf_reallocarray(main_prog->reloc_desc, new_cnt, sizeof(*relos)); in append_subprog_relos()
6057 memcpy(relos + main_prog->nr_reloc, subprog->reloc_desc, in append_subprog_relos()
6065 main_prog->reloc_desc = relos; in append_subprog_relos()
6077 struct reloc_desc *relo; in bpf_object__reloc_code()
6310 zfree(&prog->reloc_desc); in bpf_object__free_relocs()
6317 const struct reloc_desc *a = _a; in cmp_relocs()
6318 const struct reloc_desc *b = _b; in cmp_relocs()
6340 qsort(p->reloc_desc, p->nr_reloc, sizeof(*p->reloc_desc), cmp_relocs); in bpf_object__sort_relos()
6371 struct reloc_desc *relo = &prog->reloc_desc[j]; in bpf_object__relocate()
7042 struct reloc_desc *relo = &prog->reloc_desc[i]; in bpf_program_record_relos()