diff options
Diffstat (limited to 'target/linux/generic/hack-5.15')
-rw-r--r-- | target/linux/generic/hack-5.15/221-module_exports.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/generic/hack-5.15/221-module_exports.patch b/target/linux/generic/hack-5.15/221-module_exports.patch index 95aef8edf8..47f013de4f 100644 --- a/target/linux/generic/hack-5.15/221-module_exports.patch +++ b/target/linux/generic/hack-5.15/221-module_exports.patch @@ -89,6 +89,30 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> "__kstrtab_" #sym ": \n" \ " .asciz \"" #sym "\" \n" \ "__kstrtabns_" #sym ": \n" \ +--- a/include/asm-generic/export.h ++++ b/include/asm-generic/export.h +@@ -26,6 +26,12 @@ struct kernel_symbol { + #endif + .endm + ++#ifdef MODULE ++#define __EXPORT_SUFFIX(name) ++#else ++#define __EXPORT_SUFFIX(name) + #name ++#endif ++ + /* + * note on .section use: we specify progbits since usage of the "M" (SHF_MERGE) + * section flag requires it. Use '%progbits' instead of '@progbits' since the +@@ -42,7 +42,7 @@ struct kernel_symbol { + __ksymtab_\name: + __put \val, __kstrtab_\name + .previous +- .section __ksymtab_strings,"aMS",%progbits,1 ++ .section __ksymtab_strings __EXPORT_SUFFIX(name),"aMS",%progbits,1 + __kstrtab_\name: + .asciz "\name" + .previous --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -396,7 +396,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa |