diff options
| author | Siddharth Nayyar <sidnayyar@google.com> | 2026-03-26 21:25:05 +0000 |
|---|---|---|
| committer | Sami Tolvanen <samitolvanen@google.com> | 2026-03-31 23:42:52 +0000 |
| commit | 55fcb926b6d8b5cfb40873e4840a69961db1bb69 (patch) | |
| tree | 00f3d9a5933ff22e101ff492cd6caba0a0de2b49 /scripts | |
| parent | 16d0e04f546ffba78c74bbfeb57d93147bcaf2c5 (diff) | |
| download | linux-55fcb926b6d8b5cfb40873e4840a69961db1bb69.tar.gz linux-55fcb926b6d8b5cfb40873e4840a69961db1bb69.zip | |
module: use kflagstab instead of *_gpl sections
Read kflagstab section for vmlinux and modules to determine whether
kernel symbols are GPL only.
This patch eliminates the need for fragmenting the ksymtab for infering
the value of GPL-only symbol flag, henceforth stop populating *_gpl
versions of the ksymtab and kcrctab in modpost.
Signed-off-by: Siddharth Nayyar <sidnayyar@google.com>
Reviewed-by: Petr Pavlu <petr.pavlu@suse.com>
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/mod/modpost.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 1d721fe67caf..9d96acce60a8 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -1876,9 +1876,9 @@ static void add_exported_symbols(struct buffer *buf, struct module *mod) if (trim_unused_exports && !sym->used) continue; - buf_printf(buf, "KSYMTAB_%s(%s, \"%s\", \"%s\");\n", + buf_printf(buf, "KSYMTAB_%s(%s, \"%s\");\n", sym->is_func ? "FUNC" : "DATA", sym->name, - sym->is_gpl_only ? "_gpl" : "", sym->namespace); + sym->namespace); buf_printf(buf, "SYMBOL_FLAGS(%s, 0x%02x);\n", sym->name, get_symbol_flags(sym)); @@ -1899,8 +1899,8 @@ static void add_exported_symbols(struct buffer *buf, struct module *mod) sym->name, mod->name, mod->is_vmlinux ? "" : ".ko", sym->name); - buf_printf(buf, "SYMBOL_CRC(%s, 0x%08x, \"%s\");\n", - sym->name, sym->crc, sym->is_gpl_only ? "_gpl" : ""); + buf_printf(buf, "SYMBOL_CRC(%s, 0x%08x);\n", + sym->name, sym->crc); } } |
