From e7700cb5a5090d9f468e365d3e9abd5abf80e22f Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sun, 2 Feb 2003 06:08:15 -0800 Subject: [PATCH] symbol_get linkage fix Patch from Rusty Russell Make symbol_get() use undefined weak symbols if !CONFIG_MODULE. Many thanks to RTH for introducing undef weak symbols to me. --- include/linux/module.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/module.h') 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) -- cgit v1.2.3