Pull modules fixes from Jessica Yu: - Revert __ksymtab_$namespace.$symbol naming scheme back to __ksymtab_$symbol, as it was causing issues with depmod. Instead, have modpost extract a symbol's namespace from __kstrtabns and __ksymtab_strings. - Fix `make nsdeps` for out of tree kernel builds (make O=...) caused by unescaped '/'. Use a different sed delimiter to avoid this problem. * tag 'modules-for-v5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux: scripts/nsdeps: use alternative sed delimiter symbol namespaces: revert to previous __ksymtab name scheme modpost: make updating the symbol namespace explicit modpost: delegate updating namespaces to separate function
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -18,8 +18,6 @@ extern struct module __this_module; · 17 unmodified lines | |||
| 18 | #define THIS_MODULE ((struct module *)0) | 18 | #define THIS_MODULE ((struct module *)0) |
| 19 | #endif | 19 | #endif |
| 20 | 20 | ||
| 21 | #define NS_SEPARATOR "." | ||
| 22 | |||
| 23 | #ifdef CONFIG_MODVERSIONS | 21 | #ifdef CONFIG_MODVERSIONS |
| 24 | /* Mark the CRC weak since genksyms apparently decides not to | 22 | /* Mark the CRC weak since genksyms apparently decides not to |
| 25 | * generate a checksums for some symbols */ | 23 | * generate a checksums for some symbols */ |
| @@ -48,11 +46,11 @@ extern struct module __this_module; · 22 unmodified lines | |||
| 48 | * absolute relocations that require runtime processing on relocatable | 46 | * absolute relocations that require runtime processing on relocatable |
| 49 | * kernels. | 47 | * kernels. |
| 50 | */ | 48 | */ |
| 51 | #define __KSYMTAB_ENTRY_NS(sym, sec, ns) \ | 49 | #define __KSYMTAB_ENTRY_NS(sym, sec) \ |
| 52 | __ADDRESSABLE(sym) \ | 50 | __ADDRESSABLE(sym) \ |
| 53 | asm(" .section \"___ksymtab" sec "+" #sym "\", \"a\" \n" \ | 51 | asm(" .section \"___ksymtab" sec "+" #sym "\", \"a\" \n" \ |
| 54 | " .balign 4 \n" \ | 52 | " .balign 4 \n" \ |
| 55 | "__ksymtab_" #ns NS_SEPARATOR #sym ": \n" \ | 53 | "__ksymtab_" #sym ": \n" \ |
| 56 | " .long " #sym "- . \n" \ | 54 | " .long " #sym "- . \n" \ |
| 57 | " .long __kstrtab_" #sym "- . \n" \ | 55 | " .long __kstrtab_" #sym "- . \n" \ |
| 58 | " .long __kstrtabns_" #sym "- . \n" \ | 56 | " .long __kstrtabns_" #sym "- . \n" \ |
| @@ -74,16 +72,14 @@ struct kernel_symbol { · 15 unmodified lines | |||
| 74 | int namespace_offset; | 72 | int namespace_offset; |
| 75 | }; | 73 | }; |
| 76 | #else | 74 | #else |
| 77 | #define __KSYMTAB_ENTRY_NS(sym, sec, ns) \ | 75 | #define __KSYMTAB_ENTRY_NS(sym, sec) \ |
| 78 | static const struct kernel_symbol __ksymtab_##sym##__##ns \ | 76 | static const struct kernel_symbol __ksymtab_##sym \ |
| 79 | asm("__ksymtab_" #ns NS_SEPARATOR #sym) \ | ||
| 80 | __attribute__((section("___ksymtab" sec "+" #sym), used)) \ | 77 | __attribute__((section("___ksymtab" sec "+" #sym), used)) \ |
| 81 | __aligned(sizeof(void *)) \ | 78 | __aligned(sizeof(void *)) \ |
| 82 | = { (unsigned long)&sym, __kstrtab_##sym, __kstrtabns_##sym } | 79 | = { (unsigned long)&sym, __kstrtab_##sym, __kstrtabns_##sym } |
| 83 | 80 | ||
| 84 | #define __KSYMTAB_ENTRY(sym, sec) \ | 81 | #define __KSYMTAB_ENTRY(sym, sec) \ |
| 85 | static const struct kernel_symbol __ksymtab_##sym \ | 82 | static const struct kernel_symbol __ksymtab_##sym \ |
| 86 | asm("__ksymtab_" #sym) \ | ||
| 87 | __attribute__((section("___ksymtab" sec "+" #sym), used)) \ | 83 | __attribute__((section("___ksymtab" sec "+" #sym), used)) \ |
| 88 | __aligned(sizeof(void *)) \ | 84 | __aligned(sizeof(void *)) \ |
| 89 | = { (unsigned long)&sym, __kstrtab_##sym, NULL } | 85 | = { (unsigned long)&sym, __kstrtab_##sym, NULL } |
| @@ -115,7 +111,7 @@ struct kernel_symbol { · 25 unmodified lines | |||
| 115 | static const char __kstrtabns_##sym[] \ | 111 | static const char __kstrtabns_##sym[] \ |
| 116 | __attribute__((section("__ksymtab_strings"), used, aligned(1))) \ | 112 | __attribute__((section("__ksymtab_strings"), used, aligned(1))) \ |
| 117 | = #ns; \ | 113 | = #ns; \ |
| 118 | __KSYMTAB_ENTRY_NS(sym, sec, ns) | 114 | __KSYMTAB_ENTRY_NS(sym, sec) |
| 119 | 115 | ||
| 120 | #define ___EXPORT_SYMBOL(sym, sec) \ | 116 | #define ___EXPORT_SYMBOL(sym, sec) \ |
| 121 | ___export_symbol_common(sym, sec); \ | 117 | ___export_symbol_common(sym, sec); \ |