Commit e7700cb5 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[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.
parent 33cd6bac
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment