summaryrefslogtreecommitdiffstats
path: root/include/linux/module.h
diff options
context:
space:
mode:
authorAnders Kaseorg <andersk@mit.edu>2008-12-05 19:03:58 -0500
committerRusty Russell <rusty@rustcorp.com.au>2009-03-31 13:05:32 +1030
commit75a66614db21007bcc8c37f9c5d5b922981387b9 (patch)
treed02c905a3aee02ec25ce38700f47d0fa57d2cbf7 /include/linux/module.h
parenta6e6abd575fcbe6572ebc7a70ad616406d206fa8 (diff)
downloadop-kernel-dev-75a66614db21007bcc8c37f9c5d5b922981387b9.zip
op-kernel-dev-75a66614db21007bcc8c37f9c5d5b922981387b9.tar.gz
Ksplice: Add functions for walking kallsyms symbols
Impact: New API kallsyms_lookup_name only returns the first match that it finds. Ksplice needs information about all symbols with a given name in order to correctly resolve local symbols. kallsyms_on_each_symbol provides a generic mechanism for iterating over the kallsyms table. Cc: Jeff Arnold <jbarnold@mit.edu> Cc: Tim Abbott <tabbott@mit.edu> Signed-off-by: Anders Kaseorg <andersk@mit.edu> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/module.h')
-rw-r--r--include/linux/module.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 69761ce..c3d3fc4 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -387,6 +387,10 @@ int module_get_kallsym(unsigned int symnum, unsigned long *value, char *type,
/* Look for this name: can be of form module:name. */
unsigned long module_kallsyms_lookup_name(const char *name);
+int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
+ struct module *, unsigned long),
+ void *data);
+
extern void __module_put_and_exit(struct module *mod, long code)
__attribute__((noreturn));
#define module_put_and_exit(code) __module_put_and_exit(THIS_MODULE, code);
@@ -566,6 +570,14 @@ static inline unsigned long module_kallsyms_lookup_name(const char *name)
return 0;
}
+static inline int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
+ struct module *,
+ unsigned long),
+ void *data)
+{
+ return 0;
+}
+
static inline int register_module_notifier(struct notifier_block * nb)
{
/* no events will happen anyway, so this can always succeed */
OpenPOWER on IntegriCloud