/proc/kallsyms
PATCH 1/1 /proc/kallsyms
This allows access to kallsyms through /proc.
Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
Name: kallsyms in proc
Author: Rusty Russell
Status: Tested on 2.5.67-bk5
D: This adds a /proc/kallsyms if you have CONFIG_KALLSYMS in your
D: kernel. The output is nm-like, with symbols in caps (global) if
D: exported using EXPORT_SYMBOL, rather than the normal static
D: vs. non-static differntiation.
include/linux/module.h +20 -0
@@ -253,6 +253,13 @@ static inline int module_is_live(struct/* Is this address in a module? */ struct module *module_text_address (unsigned long addr); +/* Returns module and fills in value, defined and namebuf, or NULL if +symnum out of range. */ +struct module *module_get_kallsym (unsigned int symnum, +unsigned long *value, +char *type, +char namebuf[128 ]); +int is_exported (const char *name,const struct module *mod);#ifdef CONFIG_MODULE_UNLOAD void __symbol_put (const char *symbol);
@@ -379,6 +386,19 @@ static inline const char *module_addressreturn NULL ; } +static inline struct module *module_get_kallsym (unsigned int symnum, +unsigned long *value, +char *type, +char namebuf[128 ]) +{ +return NULL ; +} + +static inline int is_exported (const char *name,const struct module *mod) +{ +return 0 ; +} +static inline int register_module_notifier (struct notifier_block * nb) {/* no events will happen anyway, so this can always succeed */
kernel/kallsyms.c +162 -0
173 lines not on this page · raw message
kernel/module.c +103 -5
130 lines not on this page · raw message