Home
last modified time | relevance | path

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

/linux-6.12.1/tools/lib/bpf/
Dgen_loader.c565 struct ksym_relo_desc *relo; in bpf_gen__record_extern() local
567 relo = libbpf_reallocarray(gen->relos, gen->relo_cnt + 1, sizeof(*relo)); in bpf_gen__record_extern()
568 if (!relo) { in bpf_gen__record_extern()
572 gen->relos = relo; in bpf_gen__record_extern()
573 relo += gen->relo_cnt; in bpf_gen__record_extern()
574 relo->name = name; in bpf_gen__record_extern()
575 relo->is_weak = is_weak; in bpf_gen__record_extern()
576 relo->is_typeless = is_typeless; in bpf_gen__record_extern()
577 relo->is_ld64 = is_ld64; in bpf_gen__record_extern()
578 relo->kind = kind; in bpf_gen__record_extern()
[all …]
Drelo_core.c264 const struct bpf_core_relo *relo, in bpf_core_parse_spec() argument
274 spec_str = btf__name_by_offset(btf, relo->access_str_off); in bpf_core_parse_spec()
280 spec->root_type_id = relo->type_id; in bpf_core_parse_spec()
281 spec->relo_kind = relo->kind; in bpf_core_parse_spec()
284 if (core_relo_is_type_based(relo->kind)) { in bpf_core_parse_spec()
305 t = skip_mods_and_typedefs(btf, relo->type_id, &id); in bpf_core_parse_spec()
315 if (core_relo_is_enumval_based(relo->kind)) { in bpf_core_parse_spec()
326 if (!core_relo_is_field_based(relo->kind)) in bpf_core_parse_spec()
387 prog_name, relo->type_id, spec_str, i, id, btf_kind_str(t)); in bpf_core_parse_spec()
679 const struct bpf_core_relo *relo, in bpf_core_calc_field_relo() argument
[all …]
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,
Dlibbpf.c5778 struct reloc_desc *relos, *relo; in record_relo_core() local
5784 relo = &relos[prog->nr_reloc]; in record_relo_core()
5785 relo->type = RELO_CORE; in record_relo_core()
5786 relo->insn_idx = insn_idx; in record_relo_core()
5787 relo->core_relo = core_relo; in record_relo_core()
5795 struct reloc_desc *relo; in find_relo_core() local
5799 relo = &prog->reloc_desc[i]; in find_relo_core()
5800 if (relo->type != RELO_CORE || relo->insn_idx != insn_idx) in find_relo_core()
5803 return relo->core_relo; in find_relo_core()
5810 const struct bpf_core_relo *relo, in bpf_core_resolve_relo() argument
[all …]
Dlinker.c859 Elf64_Rel *relo; in linker_sanity_check_elf_relos() local
903 relo = sec->data->d_buf; in linker_sanity_check_elf_relos()
905 for (i = 0; i < n; i++, relo++) { in linker_sanity_check_elf_relos()
906 size_t sym_idx = ELF64_R_SYM(relo->r_info); in linker_sanity_check_elf_relos()
907 size_t sym_type = ELF64_R_TYPE(relo->r_info); in linker_sanity_check_elf_relos()
923 if (relo->r_offset % sizeof(struct bpf_insn) != 0) { in linker_sanity_check_elf_relos()
/linux-6.12.1/tools/bpf/bpftool/
Dgen.c2347 const struct bpf_core_relo *relo; in btfgen_record_obj() local
2384 for_each_btf_ext_rec(seg, sec, relo_idx, relo) { in btfgen_record_obj()
2390 if (relo->kind != BPF_CORE_TYPE_ID_LOCAL && in btfgen_record_obj()
2391 !hashmap__find(cand_cache, relo->type_id, &cands)) { in btfgen_record_obj()
2392 cands = btfgen_find_cands(btf, info->src_btf, relo->type_id); in btfgen_record_obj()
2398 err = hashmap__set(cand_cache, relo->type_id, cands, in btfgen_record_obj()
2404 err = bpf_core_calc_relo_insn(sec_name, relo, relo_idx, btf, cands, in btfgen_record_obj()
/linux-6.12.1/Documentation/bpf/
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-6.12.1/drivers/net/ethernet/netronome/nfp/bpf/
Djit.c163 enum nfp_relo_type relo) in emit_br_relo() argument
176 FIELD_PREP(OP_RELO_TYPE, relo); in emit_br_relo()
209 u8 defer, bool set, enum nfp_relo_type relo) in emit_br_bit_relo() argument
230 FIELD_PREP(OP_RELO_TYPE, relo); in emit_br_bit_relo()
634 enum nfp_relo_type relo) in wrp_immed_relo() argument
644 FIELD_PREP(OP_RELO_TYPE, relo); in wrp_immed_relo()
/linux-6.12.1/kernel/bpf/
Dbtf.c8949 int bpf_core_apply(struct bpf_core_ctx *ctx, const struct bpf_core_relo *relo, in bpf_core_apply() argument
8952 bool need_cands = relo->kind != BPF_CORE_TYPE_ID_LOCAL; in bpf_core_apply()
8966 type = btf_type_by_id(ctx->btf, relo->type_id); in bpf_core_apply()
8969 relo_idx, relo->type_id); in bpf_core_apply()
8979 cc = bpf_core_find_cands(ctx, relo->type_id); in bpf_core_apply()
8982 relo->type_id); in bpf_core_apply()
9008 err = bpf_core_calc_relo_insn((void *)ctx->log, relo, relo_idx, ctx->btf, &cands, specs, in bpf_core_apply()
9013 err = bpf_core_patch_insn((void *)ctx->log, insn, relo->insn_off / 8, relo, relo_idx, in bpf_core_apply()
/linux-6.12.1/tools/testing/selftests/bpf/
DREADME.rst319 libbpf: ELF relo #0 in section #6 has unexpected type 2 in .../bpf_tcp_nogpl.bpf.o
/linux-6.12.1/include/linux/
Dbpf.h2662 int bpf_core_apply(struct bpf_core_ctx *ctx, const struct bpf_core_relo *relo,