Lines Matching refs:sym
250 static const char *kernel_symbol_name(const struct kernel_symbol *sym) in kernel_symbol_name() argument
253 return offset_to_ptr(&sym->name_offset); in kernel_symbol_name()
255 return sym->name; in kernel_symbol_name()
259 static const char *kernel_symbol_namespace(const struct kernel_symbol *sym) in kernel_symbol_namespace() argument
262 if (!sym->namespace_offset) in kernel_symbol_namespace()
264 return offset_to_ptr(&sym->namespace_offset); in kernel_symbol_namespace()
266 return sym->namespace; in kernel_symbol_namespace()
270 int cmp_name(const void *name, const void *sym) in cmp_name() argument
272 return strcmp(name, kernel_symbol_name(sym)); in cmp_name()
279 struct kernel_symbol *sym; in find_exported_symbol_in_section() local
284 sym = bsearch(fsa->name, syms->start, syms->stop - syms->start, in find_exported_symbol_in_section()
286 if (!sym) in find_exported_symbol_in_section()
290 fsa->crc = symversion(syms->crcs, sym - syms->start); in find_exported_symbol_in_section()
291 fsa->sym = sym; in find_exported_symbol_in_section()
1013 const struct kernel_symbol *sym, in verify_namespace_is_imported() argument
1019 namespace = kernel_symbol_namespace(sym); in verify_namespace_is_imported()
1034 mod->name, kernel_symbol_name(sym), namespace); in verify_namespace_is_imported()
1088 fsa.sym = NULL; in resolve_symbol()
1093 fsa.sym = ERR_PTR(-EINVAL); in resolve_symbol()
1097 err = verify_namespace_is_imported(info, fsa.sym, mod); in resolve_symbol()
1099 fsa.sym = ERR_PTR(err); in resolve_symbol()
1114 fsa.sym = ERR_PTR(-EACCES); in resolve_symbol()
1120 fsa.sym = ERR_PTR(err); in resolve_symbol()
1129 return fsa.sym; in resolve_symbol()
1249 return (void *)kernel_symbol_value(fsa.sym); in __symbol_get()
1267 const struct kernel_symbol *sym; in verify_exported_symbols() member
1275 for (s = arr[i].sym; s < arr[i].sym + arr[i].num; s++) { in verify_exported_symbols()
1318 Elf_Shdr *symsec = &info->sechdrs[info->index.sym]; in simplify_symbols()
1319 Elf_Sym *sym = (void *)symsec->sh_addr; in simplify_symbols() local
1326 const char *name = info->strtab + sym[i].st_name; in simplify_symbols()
1328 switch (sym[i].st_shndx) { in simplify_symbols()
1347 (long)sym[i].st_value); in simplify_symbols()
1358 sym[i].st_value = kernel_symbol_value(ksym); in simplify_symbols()
1364 (ELF_ST_BIND(sym[i].st_info) == STB_WEAK || in simplify_symbols()
1381 if (sym[i].st_shndx == info->index.pcpu) in simplify_symbols()
1384 secbase = info->sechdrs[sym[i].st_shndx].sh_addr; in simplify_symbols()
1385 sym[i].st_value += secbase; in simplify_symbols()
1414 info->index.sym, i, in apply_relocations()
1418 info->index.sym, i, mod); in apply_relocations()
1421 info->index.sym, i, mod); in apply_relocations()
1955 info->index.sym = i; in setup_load_info()
1963 if (info->index.sym == 0) { in setup_load_info()