generic: 6.1: manually refresh hack patches
[openwrt/staging/ldir.git] / target / linux / generic / hack-6.1 / 221-module_exports.patch
index 87f541b46f2c0c536f4d4644323eca304e4c8142..adc2cefbd2e9e2e0111941d25f79d6b11deecae0 100644 (file)
@@ -56,10 +56,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        }                                                               \
                                                                        \
        /* __*init sections */                                          \
-@@ -1022,6 +1032,8 @@
+@@ -1018,6 +1028,8 @@
  #define COMMON_DISCARDS                                                       \
        SANITIZER_DISCARDS                                              \
+       PATCHABLE_DISCARDS                                              \
 +      SYMTAB_DISCARD                                                  \
 +      SYMTAB_DISCARD_GPL                                              \
        *(.discard)                                                     \
@@ -81,9 +81,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
   * For every exported symbol, do the following:
   *
 @@ -101,7 +107,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"     \