]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
module: remove *_gpl sections from vmlinux and modules
authorSiddharth Nayyar <sidnayyar@google.com>
Thu, 26 Mar 2026 21:25:07 +0000 (21:25 +0000)
committerSami Tolvanen <samitolvanen@google.com>
Tue, 31 Mar 2026 23:42:52 +0000 (23:42 +0000)
These sections are not used anymore and can be removed from vmlinux and
modules during linking.

Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
include/asm-generic/vmlinux.lds.h
scripts/module.lds.S

index d64a475c468ae51365cf53348758e770001bbf09..6f47c4c56574a3abd95f118a33796ca9dc2207ec 100644 (file)
                                                                        \
        PRINTK_INDEX                                                    \
                                                                        \
-       /* Kernel symbol table: Normal symbols */                       \
+       /* Kernel symbol table */                                       \
        __ksymtab         : AT(ADDR(__ksymtab) - LOAD_OFFSET) {         \
                __start___ksymtab = .;                                  \
                KEEP(*(SORT(___ksymtab+*)))                             \
                __stop___ksymtab = .;                                   \
        }                                                               \
                                                                        \
-       /* Kernel symbol table: GPL-only symbols */                     \
-       __ksymtab_gpl     : AT(ADDR(__ksymtab_gpl) - LOAD_OFFSET) {     \
-               __start___ksymtab_gpl = .;                              \
-               KEEP(*(SORT(___ksymtab_gpl+*)))                         \
-               __stop___ksymtab_gpl = .;                               \
-       }                                                               \
-                                                                       \
-       /* Kernel symbol table: Normal symbols */                       \
+       /* Kernel symbol CRC table */                                   \
        __kcrctab         : AT(ADDR(__kcrctab) - LOAD_OFFSET) {         \
                __start___kcrctab = .;                                  \
                KEEP(*(SORT(___kcrctab+*)))                             \
                __stop___kcrctab = .;                                   \
        }                                                               \
                                                                        \
-       /* Kernel symbol table: GPL-only symbols */                     \
-       __kcrctab_gpl     : AT(ADDR(__kcrctab_gpl) - LOAD_OFFSET) {     \
-               __start___kcrctab_gpl = .;                              \
-               KEEP(*(SORT(___kcrctab_gpl+*)))                         \
-               __stop___kcrctab_gpl = .;                               \
-       }                                                               \
-                                                                       \
        /* Kernel symbol flags table */                                 \
        __kflagstab       : AT(ADDR(__kflagstab) - LOAD_OFFSET) {       \
                __start___kflagstab = .;                                \
index 3ecfb3ea1cc8bee3644dca29e3e1d40f75ed581f..2dc4c8c3e667ee9908a83da5326114601dc6211c 100644 (file)
@@ -20,9 +20,7 @@ SECTIONS {
        }
 
        __ksymtab               0 : ALIGN(8) { *(SORT(___ksymtab+*)) }
-       __ksymtab_gpl           0 : ALIGN(8) { *(SORT(___ksymtab_gpl+*)) }
        __kcrctab               0 : ALIGN(4) { *(SORT(___kcrctab+*)) }
-       __kcrctab_gpl           0 : ALIGN(4) { *(SORT(___kcrctab_gpl+*)) }
        __kflagstab             0 : ALIGN(1) { *(SORT(___kflagstab+*)) }
 
        .ctors                  0 : ALIGN(8) { *(SORT(.ctors.*)) *(.ctors) }