Commit ae52cf5c authored by Rusty Russell's avatar Rusty Russell Committed by Linus Torvalds

[PATCH] Minor compile fix for some modules.

Expose declaration of __this_module outside #ifdef KBUILD_MODNAME
(which is not defined for objects included in two modules).
parent be7a02dd
...@@ -285,7 +285,9 @@ static inline const char *module_address_lookup(unsigned long addr, ...@@ -285,7 +285,9 @@ static inline const char *module_address_lookup(unsigned long addr,
} }
#endif /* CONFIG_MODULES */ #endif /* CONFIG_MODULES */
#if defined(MODULE) && defined(KBUILD_MODNAME) #ifdef MODULE
extern struct module __this_module;
#ifdef KBUILD_MODNAME
/* We make the linker do some of the work. */ /* We make the linker do some of the work. */
struct module __this_module struct module __this_module
__attribute__((section(".gnu.linkonce.this_module"))) = { __attribute__((section(".gnu.linkonce.this_module"))) = {
...@@ -296,7 +298,8 @@ __attribute__((section(".gnu.linkonce.this_module"))) = { ...@@ -296,7 +298,8 @@ __attribute__((section(".gnu.linkonce.this_module"))) = {
.exit = cleanup_module, .exit = cleanup_module,
#endif #endif
}; };
#endif /* MODULE && KBUILD_MODNAME */ #endif /* KBUILD_MODNAME */
#endif /* MODULE */
/* For archs to search exception tables */ /* For archs to search exception tables */
extern struct list_head extables; extern struct list_head extables;
......
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