[SPARC]: Fix dot-symbol exporting for good.
[sfrench/cifs-2.6.git] / scripts / mod / modpost.c
index 09ffca54b3734136aa46afcfcbaeb279e80960d9..3bed09e625c0b52c8d52f762af6ee6dfd7c86cba 100644 (file)
@@ -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