From f841536e8c5b28e1fbf8743911ae1dc78993abd4 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Sun, 1 May 2022 17:40:15 +0900 Subject: modpost: dump Module.symvers in the same order of modules.order modpost dumps the exported symbols into Module.symvers, but currently in random order because it iterates in the hash table. Add a linked list of exported symbols in struct module, so we can iterate on symbols per module. This commit makes Module.symvers much more readable; the outer loop in write_dump() iterates over the modules in the order of modules.order, and the inner loop dumps symbols in each module. Signed-off-by: Masahiro Yamada Reviewed-by: Nick Desaulniers --- scripts/mod/modpost.h | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/mod/modpost.h') diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index 2e13a736ab38..cfa127d2bb8f 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -113,6 +113,7 @@ buf_write(struct buffer *buf, const char *s, int len); struct module { struct list_head list; + struct list_head exported_symbols; struct list_head unresolved_symbols; bool is_gpl_compatible; bool from_dump; /* true if module was loaded from *.symvers */ -- cgit