diff options
Diffstat (limited to 'arch/parisc/kernel/module.c')
-rw-r--r-- | arch/parisc/kernel/module.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index b5b3cb00f1fb..43778420614b 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c | |||
@@ -877,6 +877,8 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
877 | int i; | 877 | int i; |
878 | unsigned long nsyms; | 878 | unsigned long nsyms; |
879 | const char *strtab = NULL; | 879 | const char *strtab = NULL; |
880 | const Elf_Shdr *s; | ||
881 | char *secstrings; | ||
880 | Elf_Sym *newptr, *oldptr; | 882 | Elf_Sym *newptr, *oldptr; |
881 | Elf_Shdr *symhdr = NULL; | 883 | Elf_Shdr *symhdr = NULL; |
882 | #ifdef DEBUG | 884 | #ifdef DEBUG |
@@ -948,6 +950,18 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
948 | nsyms = newptr - (Elf_Sym *)symhdr->sh_addr; | 950 | nsyms = newptr - (Elf_Sym *)symhdr->sh_addr; |
949 | DEBUGP("NEW num_symtab %lu\n", nsyms); | 951 | DEBUGP("NEW num_symtab %lu\n", nsyms); |
950 | symhdr->sh_size = nsyms * sizeof(Elf_Sym); | 952 | symhdr->sh_size = nsyms * sizeof(Elf_Sym); |
953 | |||
954 | /* find .altinstructions section */ | ||
955 | secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; | ||
956 | for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { | ||
957 | void *aseg = (void *) s->sh_addr; | ||
958 | char *secname = secstrings + s->sh_name; | ||
959 | |||
960 | if (!strcmp(".altinstructions", secname)) | ||
961 | /* patch .altinstructions */ | ||
962 | apply_alternatives(aseg, aseg + s->sh_size, me->name); | ||
963 | } | ||
964 | |||
951 | return 0; | 965 | return 0; |
952 | } | 966 | } |
953 | 967 | ||