From: Rusty Russell Sam Ravnborg found these. 1) have_vmlinux is a global, and should not be reset every time. 2) We pretend every module needs cleanup_module so it gets versioned, but that isn't defined for CONFIG_MODULE_UNLOAD=n. 3) The visible effect of this is that modpost will start complaning about undefined symbols - previously this happened only when the module was isntalled. --- 25-akpm/scripts/modpost.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff -puN scripts/modpost.c~Fix-More-Problems-Introduced-By-Module-Structure-Added-in-modpostc scripts/modpost.c --- 25/scripts/modpost.c~Fix-More-Problems-Introduced-By-Module-Structure-Added-in-modpostc 2004-04-08 13:58:21.861336584 -0700 +++ 25-akpm/scripts/modpost.c 2004-04-08 13:58:21.865335976 -0700 @@ -390,14 +390,20 @@ read_symbols(char *modname) struct elf_info info = { }; Elf_Sym *sym; - /* When there's no vmlinux, don't print warnings about - * unresolved symbols (since there'll be too many ;) */ - have_vmlinux = is_vmlinux(modname); - parse_elf(&info, modname); mod = new_module(modname); + /* When there's no vmlinux, don't print warnings about + * unresolved symbols (since there'll be too many ;) */ + if (is_vmlinux(modname)) { + unsigned int fake_crc = 0; + have_vmlinux = 1; + /* May not have this if !CONFIG_MODULE_UNLOAD: fake it. + If it appears, we'll get the real CRC. */ + add_exported_symbol("cleanup_module", mod, &fake_crc); + } + for (sym = info.symtab_start; sym < info.symtab_stop; sym++) { symname = info.strtab + sym->st_name; _