aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/genksyms/genksyms.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2008-12-01 17:21:01 -0500
committerSam Ravnborg <sam@ravnborg.org>2008-12-03 16:33:11 -0500
commit64e6c1e12372840e7caf8e25325a9e9c5fd370e6 (patch)
treeaa47aa4e170dd4bb39c99cc7356231e2c61d64d2 /scripts/genksyms/genksyms.h
parenta680eedc6c621c75695c68198533fc3c98f4053b (diff)
genksyms: track symbol checksum changes
Sometimes it is preferable to avoid changes of exported symbol checksums (to avoid breaking externally provided modules). When a checksum change occurs, it can be hard to figure out what caused this change: underlying types may have changed, or additional type information may simply have become available at the point where a symbol is exported. Add a new --reference option to genksyms which allows it to report why checksums change, based on the type information dumps it creates with the --dump-types flag. Genksyms will read in such a dump from a previous run, and report which symbols have changed (and why). The behavior can be controlled for an entire build as follows: If KBUILD_SYMTYPES is set, genksyms uses --dump-types to produce *.symtypes dump files. If any *.symref files exist, those will be used as the reference to check against. If KBUILD_PRESERVE is set, checksum changes will fail the build. Signed-off-by: Andreas Gruenbacher <agruen@suse.de> Cc: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'scripts/genksyms/genksyms.h')
-rw-r--r--scripts/genksyms/genksyms.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/genksyms/genksyms.h b/scripts/genksyms/genksyms.h
index 2668287aa498..2831158426cd 100644
--- a/scripts/genksyms/genksyms.h
+++ b/scripts/genksyms/genksyms.h
@@ -29,6 +29,10 @@ enum symbol_type {
29 SYM_NORMAL, SYM_TYPEDEF, SYM_ENUM, SYM_STRUCT, SYM_UNION 29 SYM_NORMAL, SYM_TYPEDEF, SYM_ENUM, SYM_STRUCT, SYM_UNION
30}; 30};
31 31
32enum symbol_status {
33 STATUS_UNCHANGED, STATUS_DEFINED, STATUS_MODIFIED
34};
35
32struct string_list { 36struct string_list {
33 struct string_list *next; 37 struct string_list *next;
34 enum symbol_type tag; 38 enum symbol_type tag;
@@ -43,6 +47,8 @@ struct symbol {
43 struct symbol *expansion_trail; 47 struct symbol *expansion_trail;
44 struct symbol *visited; 48 struct symbol *visited;
45 int is_extern; 49 int is_extern;
50 int is_declared;
51 enum symbol_status status;
46}; 52};
47 53
48typedef struct string_list **yystype; 54typedef struct string_list **yystype;