| /linux-6.15/tools/lib/bpf/ |
| H A D | gen_loader.c | 602 if (!relo) { in bpf_gen__record_extern() 606 gen->relos = relo; in bpf_gen__record_extern() 608 relo->name = name; in bpf_gen__record_extern() 612 relo->kind = kind; in bpf_gen__record_extern() 625 if (kdesc->kind == relo->kind && kdesc->is_ld64 == relo->is_ld64 && in get_ksym_desc() 662 debug_ret(gen, "find_by_name_kind(%s,%d)", relo->name, relo->kind); in emit_bpf_find_by_name_kind() 717 if (!relo->is_weak) in emit_relo_kfunc_btf() 779 relo->is_typeless, relo->is_weak, relo->name, ref); in emit_ksym_relo_log() 782 relo->is_typeless, relo->is_weak, relo->name, ref); in emit_ksym_relo_log() 858 if (!relo->is_weak) in emit_relo_ksym_btf() [all …]
|
| H A D | relo_core.c | 264 const struct bpf_core_relo *relo, in bpf_core_parse_spec() argument 280 spec->root_type_id = relo->type_id; in bpf_core_parse_spec() 281 spec->relo_kind = relo->kind; in bpf_core_parse_spec() 728 prog_name, relo->kind, relo->insn_off / 8); in bpf_core_calc_field_relo() 750 prog_name, relo->kind, relo->insn_off / 8); in bpf_core_calc_field_relo() 772 switch (relo->kind) { in bpf_core_calc_field_relo() 835 switch (relo->kind) { in bpf_core_calc_type_relo() 869 switch (relo->kind) { in bpf_core_calc_enumval_relo() 975 relo->kind, relo->insn_off / 8); in bpf_core_calc_relo() 1314 local_id = relo->type_id; in bpf_core_calc_relo_insn() [all …]
|
| H A D | relo_core.h | 83 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 D | libbpf.c | 5848 relo->type = RELO_CORE; in record_relo_core() 5858 struct reloc_desc *relo; in find_relo_core() local 5863 if (relo->type != RELO_CORE || relo->insn_idx != insn_idx) in find_relo_core() 5866 return relo->core_relo; in find_relo_core() 6104 switch (relo->type) { in bpf_object__relocate_data() 6414 struct reloc_desc *relo; in bpf_object__reloc_code() local 6428 if (relo && relo->type == RELO_EXTERN_CALL) in bpf_object__reloc_code() 6433 if (relo && relo->type != RELO_CALL && relo->type != RELO_SUBPROG_ADDR) { in bpf_object__reloc_code() 6438 if (relo) { in bpf_object__reloc_code() 7722 if (!relo) in fixup_log_failed_core_relo() [all …]
|
| H A D | linker.c | 989 Elf64_Rel *relo; in linker_sanity_check_elf_relos() local 1033 relo = sec->data->d_buf; in linker_sanity_check_elf_relos() 1035 for (i = 0; i < n; i++, relo++) { in linker_sanity_check_elf_relos() 1036 size_t sym_idx = ELF64_R_SYM(relo->r_info); in linker_sanity_check_elf_relos() 1037 size_t sym_type = ELF64_R_TYPE(relo->r_info); in linker_sanity_check_elf_relos() 1053 if (relo->r_offset % sizeof(struct bpf_insn) != 0) { in linker_sanity_check_elf_relos()
|
| /linux-6.15/tools/bpf/bpftool/ |
| H A D | gen.c | 2347 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.15/Documentation/bpf/ |
| H A D | llvm_reloc.rst | 313 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.15/drivers/net/ethernet/netronome/nfp/bpf/ |
| H A D | jit.c | 163 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.15/kernel/bpf/ |
| H A D | btf.c | 9220 int bpf_core_apply(struct bpf_core_ctx *ctx, const struct bpf_core_relo *relo, in bpf_core_apply() argument 9223 bool need_cands = relo->kind != BPF_CORE_TYPE_ID_LOCAL; in bpf_core_apply() 9237 type = btf_type_by_id(ctx->btf, relo->type_id); in bpf_core_apply() 9240 relo_idx, relo->type_id); in bpf_core_apply() 9250 cc = bpf_core_find_cands(ctx, relo->type_id); in bpf_core_apply() 9253 relo->type_id); in bpf_core_apply() 9279 err = bpf_core_calc_relo_insn((void *)ctx->log, relo, relo_idx, ctx->btf, &cands, specs, in bpf_core_apply() 9284 err = bpf_core_patch_insn((void *)ctx->log, insn, relo->insn_off / 8, relo, relo_idx, in bpf_core_apply()
|
| /linux-6.15/tools/testing/selftests/bpf/ |
| H A D | README.rst | 319 libbpf: ELF relo #0 in section #6 has unexpected type 2 in .../bpf_tcp_nogpl.bpf.o
|
| /linux-6.15/include/linux/ |
| H A D | bpf.h | 2763 int bpf_core_apply(struct bpf_core_ctx *ctx, const struct bpf_core_relo *relo,
|