--- zzzz-none-000/linux-4.9.231/include/linux/export.h 2020-07-22 07:10:54.000000000 +0000 +++ falcon-5530-730/linux-4.9.231/include/linux/export.h 2022-08-31 08:19:49.000000000 +0000 @@ -53,17 +53,21 @@ #define __CRC_SYMBOL(sym, sec) #endif +#ifdef MODULE +#define __EXPORT_SUFFIX(sym) +#else +#define __EXPORT_SUFFIX(sym) "+" #sym +#endif + /* For every exported symbol, place a struct in the __ksymtab section */ -#define ___EXPORT_SYMBOL(sym, sec) \ - extern typeof(sym) sym; \ - __CRC_SYMBOL(sym, sec) \ - static const char __kstrtab_##sym[] \ - __attribute__((section("__ksymtab_strings"), aligned(1))) \ - = VMLINUX_SYMBOL_STR(sym); \ - static const struct kernel_symbol __ksymtab_##sym \ - __used \ - __attribute__((section("___ksymtab" sec "+" #sym), used)) \ - = { (unsigned long)&sym, __kstrtab_##sym } +#define ___EXPORT_SYMBOL(sym, sec) \ + extern typeof(sym) sym; \ + __CRC_SYMBOL(sym, sec) \ + static const char __kstrtab_##sym[] \ + __attribute__((section("__ksymtab_strings" __EXPORT_SUFFIX(sym)), aligned(1))) = VMLINUX_SYMBOL_STR(sym); \ + static const struct kernel_symbol __ksymtab_##sym \ + __used \ + __attribute__((section("___ksymtab" sec "+" #sym), used)) = { (unsigned long)&sym, __kstrtab_##sym } #if defined(__KSYM_DEPS__)