kernel: 2.6.32: move discarding of SYMTAB entries to the right place.
[openwrt/openwrt.git] / target / linux / generic-2.6 / patches-2.6.32 / 028-module_exports.patch
index b06939f48c7a7d32f8514cff4e71c5d60e29f203..5d86333c7301d1d1d45ac59bc232375d21d079dc 100644 (file)
                VMLINUX_SYMBOL(__stop___ksymtab_gpl_future) = .;        \
        }                                                               \
                                                                        \
-@@ -323,7 +344,13 @@
+@@ -323,7 +344,7 @@
                                                                        \
        /* Kernel symbol table: strings */                              \
          __ksymtab_strings : AT(ADDR(__ksymtab_strings) - LOAD_OFFSET) {       \
 -              *(__ksymtab_strings)                                    \
 +              SYMTAB_KEEP_STR                                         \
-+      }                                                               \
-+                                                                      \
-+      /DISCARD/ : {                                                   \
-+              SYMTAB_DISCARD                                          \
-+              SYMTAB_DISCARD_GPL                                      \
-+              SYMTAB_DISCARD_STR                                      \
        }                                                               \
                                                                        \
        /* __*init sections */                                          \
+@@ -638,6 +659,9 @@
+       EXIT_TEXT                                                       \
+       EXIT_DATA                                                       \
+       EXIT_CALL                                                       \
++      SYMTAB_DISCARD                                                  \
++      SYMTAB_DISCARD_GPL                                              \
++      SYMTAB_DISCARD_STR                                              \
+       *(.discard)                                                     \
+       }
 --- a/include/linux/module.h
 +++ b/include/linux/module.h
 @@ -192,16 +192,24 @@ void *__symbol_get_gpl(const char *symbo