Lines Matching refs:kallsyms
176 mod->kallsyms = (void __rcu *)mod->init_layout.base + in add_kallsyms()
181 rcu_dereference(mod->kallsyms)->symtab = (void *)symsec->sh_addr; in add_kallsyms()
182 rcu_dereference(mod->kallsyms)->num_symtab = symsec->sh_size / sizeof(Elf_Sym); in add_kallsyms()
184 rcu_dereference(mod->kallsyms)->strtab = in add_kallsyms()
186 rcu_dereference(mod->kallsyms)->typetab = mod->init_layout.base + info->init_typeoffs; in add_kallsyms()
196 src = rcu_dereference(mod->kallsyms)->symtab; in add_kallsyms()
197 for (ndst = i = 0; i < rcu_dereference(mod->kallsyms)->num_symtab; i++) { in add_kallsyms()
198 rcu_dereference(mod->kallsyms)->typetab[i] = elf_type(src + i, info); in add_kallsyms()
205 rcu_dereference(mod->kallsyms)->typetab[i]; in add_kallsyms()
209 &rcu_dereference(mod->kallsyms)->strtab[src[i].st_name], in add_kallsyms()
253 static const char *kallsyms_symbol_name(struct mod_kallsyms *kallsyms, unsigned int symnum) in kallsyms_symbol_name() argument
255 return kallsyms->strtab + kallsyms->symtab[symnum].st_name; in kallsyms_symbol_name()
269 struct mod_kallsyms *kallsyms = rcu_dereference_sched(mod->kallsyms); in find_kallsyms_symbol() local
277 bestval = kallsyms_symbol_value(&kallsyms->symtab[best]); in find_kallsyms_symbol()
283 for (i = 1; i < kallsyms->num_symtab; i++) { in find_kallsyms_symbol()
284 const Elf_Sym *sym = &kallsyms->symtab[i]; in find_kallsyms_symbol()
294 if (*kallsyms_symbol_name(kallsyms, i) == '\0' || in find_kallsyms_symbol()
295 is_arm_mapping_symbol(kallsyms_symbol_name(kallsyms, i))) in find_kallsyms_symbol()
314 return kallsyms_symbol_name(kallsyms, best); in find_kallsyms_symbol()
422 struct mod_kallsyms *kallsyms; in module_get_kallsym() local
426 kallsyms = rcu_dereference_sched(mod->kallsyms); in module_get_kallsym()
427 if (symnum < kallsyms->num_symtab) { in module_get_kallsym()
428 const Elf_Sym *sym = &kallsyms->symtab[symnum]; in module_get_kallsym()
431 *type = kallsyms->typetab[symnum]; in module_get_kallsym()
432 strscpy(name, kallsyms_symbol_name(kallsyms, symnum), KSYM_NAME_LEN); in module_get_kallsym()
438 symnum -= kallsyms->num_symtab; in module_get_kallsym()
448 struct mod_kallsyms *kallsyms = rcu_dereference_sched(mod->kallsyms); in find_kallsyms_symbol_value() local
450 for (i = 0; i < kallsyms->num_symtab; i++) { in find_kallsyms_symbol_value()
451 const Elf_Sym *sym = &kallsyms->symtab[i]; in find_kallsyms_symbol_value()
453 if (strcmp(name, kallsyms_symbol_name(kallsyms, i)) == 0 && in find_kallsyms_symbol_value()
508 struct mod_kallsyms *kallsyms; in module_kallsyms_on_each_symbol() local
515 kallsyms = rcu_dereference_sched(mod->kallsyms); in module_kallsyms_on_each_symbol()
518 for (i = 0; i < kallsyms->num_symtab; i++) { in module_kallsyms_on_each_symbol()
519 const Elf_Sym *sym = &kallsyms->symtab[i]; in module_kallsyms_on_each_symbol()
524 ret = fn(data, kallsyms_symbol_name(kallsyms, i), in module_kallsyms_on_each_symbol()