Lines Matching refs:subprog

6214 static int append_subprog_relos(struct bpf_program *main_prog, struct bpf_program *subprog)  in append_subprog_relos()  argument
6216 int new_cnt = main_prog->nr_reloc + subprog->nr_reloc; in append_subprog_relos()
6220 if (main_prog == subprog) in append_subprog_relos()
6229 if (subprog->nr_reloc) in append_subprog_relos()
6230 memcpy(relos + main_prog->nr_reloc, subprog->reloc_desc, in append_subprog_relos()
6231 sizeof(*relos) * subprog->nr_reloc); in append_subprog_relos()
6234 relos[i].insn_idx += subprog->sub_insn_off; in append_subprog_relos()
6248 struct bpf_program *subprog; in bpf_object__reloc_code() local
6307 subprog = find_prog_by_sec_insn(obj, obj->efile.text_shndx, sub_insn_idx); in bpf_object__reloc_code()
6308 if (!subprog) { in bpf_object__reloc_code()
6324 if (subprog->sub_insn_off == 0) { in bpf_object__reloc_code()
6325 subprog->sub_insn_off = main_prog->insns_cnt; in bpf_object__reloc_code()
6327 new_cnt = main_prog->insns_cnt + subprog->insns_cnt; in bpf_object__reloc_code()
6336 memcpy(main_prog->insns + subprog->sub_insn_off, subprog->insns, in bpf_object__reloc_code()
6337 subprog->insns_cnt * sizeof(*insns)); in bpf_object__reloc_code()
6340 main_prog->name, subprog->insns_cnt, subprog->name); in bpf_object__reloc_code()
6343 err = append_subprog_relos(main_prog, subprog); in bpf_object__reloc_code()
6346 err = bpf_object__reloc_code(obj, main_prog, subprog); in bpf_object__reloc_code()
6361 insn->imm = subprog->sub_insn_off - (prog->sub_insn_off + insn_idx) - 1; in bpf_object__reloc_code()
6364 prog->name, insn_idx, insn->imm, subprog->name, subprog->sub_insn_off); in bpf_object__reloc_code()
6454 struct bpf_program *subprog; in bpf_object__relocate_calls() local
6461 subprog = &obj->programs[i]; in bpf_object__relocate_calls()
6462 if (!prog_is_subprog(obj, subprog)) in bpf_object__relocate_calls()
6465 subprog->sub_insn_off = 0; in bpf_object__relocate_calls()