summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-02-02 06:08:15 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2003-02-02 06:08:15 -0800
commite7700cb5a5090d9f468e365d3e9abd5abf80e22f (patch)
treeed0ae8e56c1cae589caffb6163cbd1b8387d137b /include/linux
parent33cd6bac4c8829e7daa5b58cbdc412ee3c0aaeaa (diff)
[PATCH] symbol_get linkage fix
Patch from Rusty Russell <rusty@rustcorp.com.au> Make symbol_get() use undefined weak symbols if !CONFIG_MODULE. Many thanks to RTH for introducing undef weak symbols to me.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/module.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/module.h b/include/linux/module.h
index 6dad1479105f..5b2fb9d19be3 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -344,7 +344,7 @@ static inline int module_text_address(unsigned long addr)
}
/* Get/put a kernel symbol (calls should be symmetric) */
-#define symbol_get(x) (&(x))
+#define symbol_get(x) ({ extern typeof(x) x __attribute__((weak)); &(x); })
#define symbol_put(x) do { } while(0)
#define symbol_put_addr(x) do { } while(0)