mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
Simplify kallsyms_lookup()
Several kallsyms_lookup() pass dummy arguments but only need, say, module's name. Make kallsyms_lookup() accept NULLs where possible. Also, makes picture clearer about what interfaces are needed for all symbol resolving business. Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru> Cc: Rusty Russell <rusty@rustcorp.com.au> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
ea07890a68
commit
ffb4512276
10 changed files with 20 additions and 28 deletions
|
@ -2098,8 +2098,10 @@ static const char *get_ksymbol(struct module *mod,
|
|||
if (!best)
|
||||
return NULL;
|
||||
|
||||
*size = nextval - mod->symtab[best].st_value;
|
||||
*offset = addr - mod->symtab[best].st_value;
|
||||
if (size)
|
||||
*size = nextval - mod->symtab[best].st_value;
|
||||
if (offset)
|
||||
*offset = addr - mod->symtab[best].st_value;
|
||||
return mod->strtab + mod->symtab[best].st_name;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue