Lines Matching refs:glob_sym
78 struct glob_sym { struct
152 struct glob_sym *glob_syms;
1295 static struct glob_sym *find_glob_sym(struct bpf_linker *linker, const char *sym_name) in find_glob_sym()
1297 struct glob_sym *glob_sym; in find_glob_sym() local
1302 glob_sym = &linker->glob_syms[i]; in find_glob_sym()
1303 name = strset__data(linker->strtab_strs) + glob_sym->name_off; in find_glob_sym()
1306 return glob_sym; in find_glob_sym()
1312 static struct glob_sym *add_glob_sym(struct bpf_linker *linker) in add_glob_sym()
1314 struct glob_sym *syms, *sym; in add_glob_sym()
1614 struct bpf_linker *linker, struct glob_sym *glob_sym, in glob_map_defs_match() argument
1636 t = btf__type_by_id(linker->btf, glob_sym->btf_id); in glob_map_defs_match()
1654 struct bpf_linker *linker, struct glob_sym *glob_sym, in glob_syms_match() argument
1662 if (!glob_sym->btf_id || !btf_id) { in glob_syms_match()
1675 if (glob_sym->sec_id && strcmp(linker->secs[glob_sym->sec_id].sec_name, MAPS_ELF_SEC) == 0) in glob_syms_match()
1676 return glob_map_defs_match(sym_name, linker, glob_sym, obj, sym, btf_id); in glob_syms_match()
1679 linker->btf, glob_sym->btf_id, obj->btf, btf_id)) in glob_syms_match()
1849 struct glob_sym *glob_sym = NULL; in linker_append_elf_sym() local
1910 glob_sym = find_glob_sym(linker, sym_name); in linker_append_elf_sym()
1911 if (glob_sym) { in linker_append_elf_sym()
1916 obj->sym_map[src_sym_idx] = glob_sym->sym_idx; in linker_append_elf_sym()
1922 if (!sym_is_extern && !glob_sym->is_extern in linker_append_elf_sym()
1923 && !glob_sym->is_weak && sym_bind != STB_WEAK) { in linker_append_elf_sym()
1929 if (!glob_syms_match(sym_name, linker, glob_sym, obj, sym, src_sym_idx, btf_id)) in linker_append_elf_sym()
1932 dst_sym = get_sym_by_idx(linker, glob_sym->sym_idx); in linker_append_elf_sym()
1944 glob_sym->is_weak = false; in linker_append_elf_sym()
1969 if (!glob_sym->is_extern && sym_bind == STB_WEAK) in linker_append_elf_sym()
1982 glob_sym->sec_id = dst_sec->id; in linker_append_elf_sym()
1983 glob_sym->is_extern = false; in linker_append_elf_sym()
1985 if (complete_extern_btf_info(linker->btf, glob_sym->btf_id, in linker_append_elf_sym()
1990 glob_sym->underlying_btf_id = 0; in linker_append_elf_sym()
1992 obj->sym_map[src_sym_idx] = glob_sym->sym_idx; in linker_append_elf_sym()
2020 glob_sym = add_glob_sym(linker); in linker_append_elf_sym()
2021 if (!glob_sym) in linker_append_elf_sym()
2024 glob_sym->sym_idx = dst_sym_idx; in linker_append_elf_sym()
2031 glob_sym->sec_id = dst_sec ? dst_sec->id : 0; in linker_append_elf_sym()
2032 glob_sym->name_off = name_off; in linker_append_elf_sym()
2034 glob_sym->btf_id = 0; in linker_append_elf_sym()
2035 glob_sym->is_extern = sym_is_extern; in linker_append_elf_sym()
2036 glob_sym->is_weak = sym_bind == STB_WEAK; in linker_append_elf_sym()
2275 struct glob_sym *glob_sym = NULL; in linker_append_btf() local
2286 glob_sym = find_glob_sym(linker, name); in linker_append_btf()
2292 if (!glob_sym) in linker_append_btf()
2299 if (glob_sym->underlying_btf_id == 0) in linker_append_btf()
2300 glob_sym->underlying_btf_id = -t->type; in linker_append_btf()
2306 if (glob_sym->btf_id) { in linker_append_btf()
2308 obj->btf_type_map[i] = glob_sym->btf_id; in linker_append_btf()
2322 if (glob_sym) { in linker_append_btf()
2323 glob_sym->btf_id = id; in linker_append_btf()
2324 glob_sym->underlying_btf_id = -t->type; in linker_append_btf()
2357 struct glob_sym *glob_sym = &linker->glob_syms[i]; in linker_append_btf() local
2360 if (glob_sym->underlying_btf_id >= 0) in linker_append_btf()
2363 glob_sym->underlying_btf_id = obj->btf_type_map[-glob_sym->underlying_btf_id]; in linker_append_btf()
2365 glob_t = btf_type_by_id(linker->btf, glob_sym->btf_id); in linker_append_btf()
2366 glob_t->type = glob_sym->underlying_btf_id; in linker_append_btf()
2397 struct glob_sym *glob_sym = NULL; in linker_append_btf() local
2402 glob_sym = find_glob_sym(linker, name); in linker_append_btf()
2403 if (glob_sym->sec_id != dst_sec->id) { in linker_append_btf()
2405 name, glob_sym->sec_id, dst_sec->id); in linker_append_btf()
2415 if (glob_sym && glob_sym->var_idx >= 0) { in linker_append_btf()
2418 dst_var = &dst_sec->sec_vars[glob_sym->var_idx]; in linker_append_btf()
2423 sz = btf__resolve_size(linker->btf, glob_sym->underlying_btf_id); in linker_append_btf()
2447 if (glob_sym) in linker_append_btf()
2448 glob_sym->var_idx = dst_sec->sec_var_cnt - 1; in linker_append_btf()