Lines Matching refs:sec_idx
376 size_t sec_idx; member
495 int sec_idx; member
702 prog->sec_idx = -1; in bpf_program__exit()
727 const char *name, size_t sec_idx, const char *sec_name, in bpf_object__init_prog() argument
739 prog->sec_idx = sec_idx; in bpf_object__init_prog()
787 const char *sec_name, int sec_idx) in bpf_object__add_programs() argument
805 if (sym->st_shndx != sec_idx) in bpf_object__add_programs()
826 if (sec_idx != obj->efile.text_shndx && ELF64_ST_BIND(sym->st_info) == STB_LOCAL) { in bpf_object__add_programs()
849 err = bpf_object__init_prog(obj, prog, name, sec_idx, sec_name, in bpf_object__add_programs()
1207 map->sec_idx = obj->efile.st_ops_shndx; in bpf_object__init_struct_ops_maps()
1589 const char *real_name, int sec_idx, void *data, size_t data_sz) in bpf_object__init_internal_map() argument
1600 map->sec_idx = sec_idx; in bpf_object__init_internal_map()
1620 map->name, map->sec_idx, map->sec_offset, def->map_flags); in bpf_object__init_internal_map()
1648 int err = 0, sec_idx; in bpf_object__init_global_data_maps() local
1653 for (sec_idx = 1; sec_idx < obj->efile.sec_cnt; sec_idx++) { in bpf_object__init_global_data_maps()
1654 sec_desc = &obj->efile.secs[sec_idx]; in bpf_object__init_global_data_maps()
1662 sec_name = elf_sec_name(obj, elf_sec_by_idx(obj, sec_idx)); in bpf_object__init_global_data_maps()
1664 sec_name, sec_idx, in bpf_object__init_global_data_maps()
1670 sec_name = elf_sec_name(obj, elf_sec_by_idx(obj, sec_idx)); in bpf_object__init_global_data_maps()
1672 sec_name, sec_idx, in bpf_object__init_global_data_maps()
1677 sec_name = elf_sec_name(obj, elf_sec_by_idx(obj, sec_idx)); in bpf_object__init_global_data_maps()
1679 sec_name, sec_idx, in bpf_object__init_global_data_maps()
2457 int var_idx, int sec_idx, in bpf_object__init_user_btf_map() argument
2514 map->sec_idx = sec_idx; in bpf_object__init_user_btf_map()
2518 map_name, map->sec_idx, map->sec_offset); in bpf_object__init_user_btf_map()
2539 map->inner_map->sec_idx = sec_idx; in bpf_object__init_user_btf_map()
3299 if (a->sec_idx != b->sec_idx) in cmp_progs()
3300 return a->sec_idx < b->sec_idx ? -1 : 1; in cmp_progs()
3898 return prog->sec_idx == obj->efile.text_shndx && obj->nr_programs > 1; in prog_is_subprog()
4058 map->sec_idx != sym->st_shndx || in bpf_program__record_reloc()
4062 prog->name, map_idx, map->name, map->sec_idx, in bpf_program__record_reloc()
4086 if (map->libbpf_type != type || map->sec_idx != sym->st_shndx) in bpf_program__record_reloc()
4089 prog->name, map_idx, map->name, map->sec_idx, in bpf_program__record_reloc()
4113 size_t sec_idx, size_t insn_idx) in find_prog_by_sec_insn() argument
4125 if (prog->sec_idx < sec_idx || in find_prog_by_sec_insn()
4126 (prog->sec_idx == sec_idx && prog->sec_insn_off <= insn_idx)) in find_prog_by_sec_insn()
4135 if (prog->sec_idx == sec_idx && prog_contains_insn(prog, insn_idx)) in find_prog_by_sec_insn()
4144 size_t sec_idx = shdr->sh_info, sym_idx; in bpf_object__collect_prog_relos() local
4155 if (sec_idx >= obj->efile.sec_cnt) in bpf_object__collect_prog_relos()
4158 scn = elf_sec_by_idx(obj, sec_idx); in bpf_object__collect_prog_relos()
4167 relo_sec_name, sec_idx, sec_name); in bpf_object__collect_prog_relos()
4213 prog = find_prog_by_sec_insn(obj, sec_idx, insn_idx); in bpf_object__collect_prog_relos()
4249 if (map->sec_idx == obj->efile.btf_maps_shndx || bpf_map__is_struct_ops(map)) in bpf_map_find_btf_info()
5661 int i, err = 0, insn_idx, sec_idx, sec_num; in bpf_object__relocate_core() local
5684 sec_idx = seg->sec_idxs[sec_num]; in bpf_object__relocate_core()
5699 prog = find_prog_by_sec_insn(obj, sec_idx, insn_idx); in bpf_object__relocate_core()
5909 int i, sec_num, sec_idx, off_adj; in adjust_prog_btf_ext_info() local
5913 sec_idx = ext_info->sec_idxs[sec_num]; in adjust_prog_btf_ext_info()
5915 if (prog->sec_idx != sec_idx) in adjust_prog_btf_ext_info()
6482 if (map->sec_idx != obj->efile.btf_maps_shndx) in bpf_object__collect_map_relos()
6524 if (targ_prog->sec_idx != sym->st_shndx || in bpf_object__collect_map_relos()