Home
last modified time | relevance | path

Searched refs:relo (Results 1 – 10 of 10) sorted by relevance

/linux/tools/lib/bpf/
H A Dgen_loader.c615 struct ksym_relo_desc *relo; in bpf_gen__record_extern() local
617 relo = libbpf_reallocarray(gen->relos, gen->relo_cnt + 1, sizeof(*relo)); in bpf_gen__record_extern()
618 if (!relo) { in bpf_gen__record_extern()
622 gen->relos = relo; in bpf_gen__record_extern()
623 relo += gen->relo_cnt; in bpf_gen__record_extern()
624 relo->name = name; in bpf_gen__record_extern()
625 relo->is_weak = is_weak; in bpf_gen__record_extern()
626 relo->is_typeless = is_typeless; in bpf_gen__record_extern()
627 relo->is_ld64 = is_ld64; in bpf_gen__record_extern()
628 relo->kind = kind; in bpf_gen__record_extern()
[all …]
H A Drelo_core.c263 const struct bpf_core_relo *relo, in bpf_core_parse_spec() argument
273 spec_str = btf__name_by_offset(btf, relo->access_str_off); in bpf_core_parse_spec()
279 spec->root_type_id = relo->type_id; in bpf_core_parse_spec()
280 spec->relo_kind = relo->kind; in bpf_core_parse_spec()
283 if (core_relo_is_type_based(relo->kind)) { in bpf_core_parse_spec()
306 t = skip_mods_and_typedefs(btf, relo->type_id, &id); in bpf_core_parse_spec()
316 if (core_relo_is_enumval_based(relo->kind)) { in bpf_core_parse_spec()
327 if (!core_relo_is_field_based(relo->kind)) in bpf_core_parse_spec()
388 prog_name, relo->type_id, spec_str, i, id, btf_kind_str(t)); in bpf_core_parse_spec()
680 const struct bpf_core_relo *relo, in bpf_core_calc_field_relo() argument
[all …]
H A Drelo_core.h83 const struct bpf_core_relo *relo, int relo_idx,
90 int insn_idx, const struct bpf_core_relo *relo,
94 const struct bpf_core_relo *relo,
H A Dlibbpf.c6056 struct reloc_desc *relos, *relo; in record_relo_core() local
6062 relo = &relos[prog->nr_reloc]; in record_relo_core()
6063 relo->type = RELO_CORE; in record_relo_core()
6064 relo->insn_idx = insn_idx; in record_relo_core()
6065 relo->core_relo = core_relo; in record_relo_core()
6073 struct reloc_desc *relo; in find_relo_core() local
6077 relo = &prog->reloc_desc[i]; in find_relo_core()
6078 if (relo->type != RELO_CORE || relo->insn_idx != insn_idx) in find_relo_core()
6081 return relo->core_relo; in find_relo_core()
6088 const struct bpf_core_relo *relo, in bpf_core_resolve_relo() argument
[all …]
H A Dlinker.c988 Elf64_Rel *relo; in linker_sanity_check_elf_relos() local
1032 relo = sec->data->d_buf; in linker_sanity_check_elf_relos()
1034 for (i = 0; i < n; i++, relo++) { in linker_sanity_check_elf_relos()
1035 size_t sym_idx = ELF64_R_SYM(relo->r_info); in linker_sanity_check_elf_relos()
1036 size_t sym_type = ELF64_R_TYPE(relo->r_info); in linker_sanity_check_elf_relos()
1052 if (relo->r_offset % sizeof(struct bpf_insn) != 0) { in linker_sanity_check_elf_relos()
/linux/tools/bpf/bpftool/
H A Dgen.c2440 const struct bpf_core_relo *relo; in btfgen_record_obj() local
2477 for_each_btf_ext_rec(seg, sec, relo_idx, relo) { in btfgen_record_obj()
2483 if (relo->kind != BPF_CORE_TYPE_ID_LOCAL && in btfgen_record_obj()
2484 !hashmap__find(cand_cache, relo->type_id, &cands)) { in btfgen_record_obj()
2485 cands = btfgen_find_cands(btf, info->src_btf, relo->type_id); in btfgen_record_obj()
2491 err = hashmap__set(cand_cache, relo->type_id, cands, in btfgen_record_obj()
2497 err = bpf_core_calc_relo_insn(sec_name, relo, relo_idx, btf, cands, in btfgen_record_obj()
/linux/Documentation/bpf/
H A Dllvm_reloc.rst313 is_signed = relo(s->f, BPF_CORE_FIELD_SIGNED)
314 off = relo(s->f, BPF_CORE_FIELD_BYTE_OFFSET)
315 sz = relo(s->f, BPF_CORE_FIELD_BYTE_SIZE)
316 l = relo(s->f, BPF_CORE_FIELD_LSHIFT_U64)
317 r = relo(s->f, BPF_CORE_FIELD_RSHIFT_U64)
/linux/kernel/bpf/
H A Dbtf.c9708 int bpf_core_apply(struct bpf_core_ctx *ctx, const struct bpf_core_relo *relo, in bpf_core_apply() argument
9711 bool need_cands = relo->kind != BPF_CORE_TYPE_ID_LOCAL; in bpf_core_apply()
9725 type = btf_type_by_id(ctx->btf, relo->type_id); in bpf_core_apply()
9728 relo_idx, relo->type_id); in bpf_core_apply()
9738 cc = bpf_core_find_cands(ctx, relo->type_id); in bpf_core_apply()
9741 relo->type_id); in bpf_core_apply()
9768 err = bpf_core_calc_relo_insn((void *)ctx->log, relo, relo_idx, ctx->btf, &cands, specs, in bpf_core_apply()
9773 err = bpf_core_patch_insn((void *)ctx->log, insn, relo->insn_off / 8, relo, relo_idx, in bpf_core_apply()
/linux/tools/testing/selftests/bpf/
H A DREADME.rst319 libbpf: ELF relo #0 in section #6 has unexpected type 2 in .../bpf_tcp_nogpl.bpf.o
/linux/include/linux/
H A Dbpf.h3197 int bpf_core_apply(struct bpf_core_ctx *ctx, const struct bpf_core_relo *relo,