kbuild: generate Module.symvers only when vmlinux exists
[linux-2.6-microblaze.git] / scripts / mod / modpost.c
index 24725e5..10c3fba 100644 (file)
@@ -2423,19 +2423,6 @@ fail:
        fatal("parse error in symbol dump file\n");
 }
 
-/* For normal builds always dump all symbols.
- * For external modules only dump symbols
- * that are not read from kernel Module.symvers.
- **/
-static int dump_sym(struct symbol *sym)
-{
-       if (!external_module)
-               return 1;
-       if (sym->module->from_dump)
-               return 0;
-       return 1;
-}
-
 static void write_dump(const char *fname)
 {
        struct buffer buf = { };
@@ -2446,7 +2433,7 @@ static void write_dump(const char *fname)
        for (n = 0; n < SYMBOL_HASH_SIZE ; n++) {
                symbol = symbolhash[n];
                while (symbol) {
-                       if (dump_sym(symbol)) {
+                       if (!symbol->module->from_dump) {
                                namespace = symbol->namespace;
                                buf_printf(&buf, "0x%08x\t%s\t%s\t%s\t%s\n",
                                           symbol->crc, symbol->name,