]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - scripts/mod/modpost.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
[linux-2.6-omap-h63xx.git] / scripts / mod / modpost.c
index 09ffca54b3734136aa46afcfcbaeb279e80960d9..f70ff13d481834b14ceb926879a6a3a2e99e1894 100644 (file)
@@ -326,8 +326,8 @@ parse_elf_finish(struct elf_info *info)
        release_file(info->hdr, info->size);
 }
 
-#define CRC_PFX     MODULE_SYMBOL_PREFIX "__crc_"
-#define KSYMTAB_PFX MODULE_SYMBOL_PREFIX "__ksymtab_"
+#define CRC_PFX     "__crc_"
+#define KSYMTAB_PFX "__ksymtab_"
 
 void
 handle_modversions(struct module *mod, struct elf_info *info,
@@ -370,6 +370,12 @@ handle_modversions(struct module *mod, struct elf_info *info,
                        /* Ignore register directives. */
                        if (ELF_ST_TYPE(sym->st_info) == STT_SPARC_REGISTER)
                                break;
+                       if (symname[0] == '.') {
+                               char *munged = strdup(symname);
+                               munged[0] = '_';
+                               munged[1] = toupper(munged[1]);
+                               symname = munged;
+                       }
                }
 #endif
                
@@ -533,10 +539,9 @@ add_header(struct buffer *b, struct module *mod)
        buf_printf(b, "\n");
        buf_printf(b, "MODULE_INFO(vermagic, VERMAGIC_STRING);\n");
        buf_printf(b, "\n");
-       buf_printf(b, "#undef unix\n"); /* We have a module called "unix" */
        buf_printf(b, "struct module __this_module\n");
        buf_printf(b, "__attribute__((section(\".gnu.linkonce.this_module\"))) = {\n");
-       buf_printf(b, " .name = __stringify(KBUILD_MODNAME),\n");
+       buf_printf(b, " .name = KBUILD_MODNAME,\n");
        if (mod->has_init)
                buf_printf(b, " .init = init_module,\n");
        if (mod->has_cleanup)