diff options
| author | Rusty Russell <rusty@rustcorp.com.au> | 2003-02-14 10:16:23 -0600 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2003-02-14 10:16:23 -0600 |
| commit | ccada2dfe81978d16bf226386111ef8a72ecdd7b (patch) | |
| tree | d74403b4384e10572253009e7b27d248e2bc3c99 /scripts | |
| parent | 1cc0e0529569bf6a94f6d49770aa6d4b599d2c46 (diff) | |
kbuild: Do modversions checks on module structure
Checks the module structure itself when CONFIG_MODVERSIONS is set.
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/modpost.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/modpost.c b/scripts/modpost.c index 5b21b7a27353..6da8241ce7a6 100644 --- a/scripts/modpost.c +++ b/scripts/modpost.c @@ -308,6 +308,7 @@ read_symbols(char *modname) const char *symname; struct module *mod; struct elf_info info = { }; + struct symbol *s; Elf_Sym *sym; /* When there's no vmlinux, don't print warnings about @@ -326,6 +327,17 @@ read_symbols(char *modname) handle_moddevtable(mod, &info, sym, symname); } parse_elf_finish(&info); + + /* Our trick to get versioning for struct_module - it's + * never passed as an argument to an exported function, so + * the automatic versioning doesn't pick it up, but it's really + * important anyhow */ + if (modversions) { + s = alloc_symbol("struct_module"); + /* add to list */ + s->next = mod->unres; + mod->unres = s; + } } #define SZ 500 @@ -502,6 +514,7 @@ main(int argc, char **argv) { struct module *mod; struct buffer buf = { }; + struct symbol *s; char fname[SZ]; for (; argv[1]; argv++) { |
