diff options
Diffstat (limited to 'arch/sparc/kernel/module.c')
-rw-r--r-- | arch/sparc/kernel/module.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/sparc/kernel/module.c b/arch/sparc/kernel/module.c index 7931d6f92819..787d5f1347ec 100644 --- a/arch/sparc/kernel/module.c +++ b/arch/sparc/kernel/module.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/vmalloc.h> | 10 | #include <linux/vmalloc.h> |
11 | #include <linux/fs.h> | 11 | #include <linux/fs.h> |
12 | #include <linux/string.h> | 12 | #include <linux/string.h> |
13 | #include <linux/ctype.h> | ||
13 | 14 | ||
14 | void *module_alloc(unsigned long size) | 15 | void *module_alloc(unsigned long size) |
15 | { | 16 | { |
@@ -37,7 +38,7 @@ void module_free(struct module *mod, void *module_region) | |||
37 | } | 38 | } |
38 | 39 | ||
39 | /* Make generic code ignore STT_REGISTER dummy undefined symbols, | 40 | /* Make generic code ignore STT_REGISTER dummy undefined symbols, |
40 | * and replace references to .func with func as in ppc64's dedotify. | 41 | * and replace references to .func with _Func |
41 | */ | 42 | */ |
42 | int module_frob_arch_sections(Elf_Ehdr *hdr, | 43 | int module_frob_arch_sections(Elf_Ehdr *hdr, |
43 | Elf_Shdr *sechdrs, | 44 | Elf_Shdr *sechdrs, |
@@ -64,8 +65,10 @@ int module_frob_arch_sections(Elf_Ehdr *hdr, | |||
64 | sym[i].st_shndx = SHN_ABS; | 65 | sym[i].st_shndx = SHN_ABS; |
65 | else { | 66 | else { |
66 | char *name = strtab + sym[i].st_name; | 67 | char *name = strtab + sym[i].st_name; |
67 | if (name[0] == '.') | 68 | if (name[0] == '.') { |
68 | memmove(name, name+1, strlen(name)); | 69 | name[0] = '_'; |
70 | name[1] = toupper(name[1]); | ||
71 | } | ||
69 | } | 72 | } |
70 | } | 73 | } |
71 | } | 74 | } |