summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSiddharth Nayyar <sidnayyar@google.com>2026-03-26 21:25:04 +0000
committerSami Tolvanen <samitolvanen@google.com>2026-03-31 23:42:52 +0000
commit16d0e04f546ffba78c74bbfeb57d93147bcaf2c5 (patch)
tree1ebf5a5d161301d08a6d609e4abc3f60e581f4fc /include
parent9743311b4535dc76ce81f46303da0f69bfaa5fd6 (diff)
module: populate kflagstab in modpost
This patch adds the ability to create entries for kernel symbol flag bitsets in kflagstab. Modpost populates only the GPL-only flag for now. 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 'include')
-rw-r--r--include/linux/export-internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/export-internal.h b/include/linux/export-internal.h
index d445705ac13c..4123c7592404 100644
--- a/include/linux/export-internal.h
+++ b/include/linux/export-internal.h
@@ -69,4 +69,11 @@
".long " #crc "\n" \
".previous" "\n")
+#define SYMBOL_FLAGS(sym, flags) \
+ asm(" .section \"___kflagstab+" #sym "\",\"a\"" "\n" \
+ "__flags_" #sym ":" "\n" \
+ " .byte " #flags "\n" \
+ " .previous" "\n" \
+ )
+
#endif /* __LINUX_EXPORT_INTERNAL_H__ */