diff options
Diffstat (limited to 'include/linux/module.h')
| -rw-r--r-- | include/linux/module.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/include/linux/module.h b/include/linux/module.h index f38e535eacd9..507fa6c563ef 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -36,7 +36,7 @@ struct kernel_symbol { unsigned long value; - char name[MODULE_NAME_LEN]; + const char *name; }; /* These are either module local, or the kernel's dummy ones. */ @@ -140,17 +140,23 @@ void *__symbol_get_gpl(const char *symbol); #define symbol_get(x) ((typeof(&x))(__symbol_get(MODULE_SYMBOL_PREFIX #x))) /* For every exported symbol, place a struct in the __ksymtab section */ -#define EXPORT_SYMBOL(sym) \ - const struct kernel_symbol __ksymtab_##sym \ - __attribute__((section("__ksymtab"))) \ - = { (unsigned long)&sym, MODULE_SYMBOL_PREFIX #sym } +#define EXPORT_SYMBOL(sym) \ + static const char __kstrtab_##sym[] \ + __attribute__((section("__ksymtab_strings"))) \ + = MODULE_SYMBOL_PREFIX #sym; \ + static const struct kernel_symbol __ksymtab_##sym \ + __attribute__((section("__ksymtab"))) \ + = { (unsigned long)&sym, __kstrtab_##sym } #define EXPORT_SYMBOL_NOVERS(sym) EXPORT_SYMBOL(sym) -#define EXPORT_SYMBOL_GPL(sym) \ - const struct kernel_symbol __ksymtab_##sym \ - __attribute__((section("__gpl_ksymtab"))) \ - = { (unsigned long)&sym, #sym } +#define EXPORT_SYMBOL_GPL(sym) \ + static const char __kstrtab_##sym[] \ + __attribute__((section("__ksymtab_strings"))) \ + = MODULE_SYMBOL_PREFIX #sym; \ + static const struct kernel_symbol __ksymtab_##sym \ + __attribute__((section("__gpl_ksymtab"))) \ + = { (unsigned long)&sym, __kstrtab_##sym } struct module_ref { |
