/* Align . to a 8 byte boundary equals to maximum function alignment. */
#define ALIGN_FUNCTION() . = ALIGN(8)
-@@ -485,14 +495,14 @@
+@@ -511,14 +521,14 @@
/* Kernel symbol table: Normal symbols */ \
__ksymtab : AT(ADDR(__ksymtab) - LOAD_OFFSET) { \
__start___ksymtab = .; \
__stop___ksymtab_gpl = .; \
} \
\
-@@ -512,7 +522,7 @@
+@@ -538,7 +548,7 @@
\
/* Kernel symbol table: strings */ \
__ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) { \
} \
\
/* __*init sections */ \
-@@ -1022,6 +1032,8 @@
-
+@@ -1042,6 +1052,8 @@
#define COMMON_DISCARDS \
SANITIZER_DISCARDS \
+ PATCHABLE_DISCARDS \
+ SYMTAB_DISCARD \
+ SYMTAB_DISCARD_GPL \
*(.discard) \
*(.modinfo) \
--- a/include/linux/export.h
+++ b/include/linux/export.h
-@@ -84,6 +84,12 @@ struct kernel_symbol {
+@@ -72,6 +72,12 @@ struct kernel_symbol {
#else
/*
* For every exported symbol, do the following:
*
-@@ -101,7 +107,7 @@ struct kernel_symbol {
+@@ -87,7 +93,7 @@ struct kernel_symbol {
+ extern typeof(sym) sym; \
extern const char __kstrtab_##sym[]; \
extern const char __kstrtabns_##sym[]; \
- __CRC_SYMBOL(sym, sec); \
- asm(" .section \"__ksymtab_strings\",\"aMS\",%progbits,1 \n" \
+ asm(" .section \"__ksymtab_strings" __EXPORT_SUFFIX(sym) "\",\"aMS\",%progbits,1 \n" \
"__kstrtab_" #sym ": \n" \
"__kstrtabns_" #sym ": \n" \
--- a/include/asm-generic/export.h
+++ b/include/asm-generic/export.h
-@@ -26,6 +26,12 @@
+@@ -31,6 +31,12 @@
#endif
.endm
/*
* 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
-@@ -39,7 +45,7 @@
+@@ -44,7 +50,7 @@
__ksymtab_\name:
__put \val, __kstrtab_\name
.previous
.previous
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
-@@ -397,7 +397,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa
+@@ -388,7 +388,7 @@ targets += $(real-dtb-y) $(lib-y) $(alwa
# Linker scripts preprocessor (.lds.S -> .lds)
# ---------------------------------------------------------------------------
quiet_cmd_cpp_lds_S = LDS $@