diff options
Diffstat (limited to 'arch/sh/kernel/module.c')
| -rw-r--r-- | arch/sh/kernel/module.c | 50 |
1 files changed, 10 insertions, 40 deletions
diff --git a/arch/sh/kernel/module.c b/arch/sh/kernel/module.c index c43081039dd..1b525dedd29 100644 --- a/arch/sh/kernel/module.c +++ b/arch/sh/kernel/module.c @@ -32,32 +32,7 @@ #include <linux/string.h> #include <linux/kernel.h> #include <asm/unaligned.h> - -void *module_alloc(unsigned long size) -{ - if (size == 0) - return NULL; - - return vmalloc_exec(size); -} - - -/* Free memory returned from module_alloc */ -void module_free(struct module *mod, void *module_region) -{ - vfree(module_region); - /* FIXME: If module_region == mod->init_region, trim exception - table entries. */ -} - -/* We don't need anything special. */ -int module_frob_arch_sections(Elf_Ehdr *hdr, - Elf_Shdr *sechdrs, - char *secstrings, - struct module *mod) -{ - return 0; -} +#include <asm/dwarf.h> int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab, @@ -90,10 +65,12 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, * SHmedia, the LSB of the symbol needs to be asserted * for the CPU to be in SHmedia mode when it starts executing * the branch target. */ - relocation |= (sym->st_other & 4); + relocation |= !!(sym->st_other & 4); #endif switch (ELF32_R_TYPE(rel[i].r_info)) { + case R_SH_NONE: + break; case R_SH_DIR32: value = get_unaligned(location); value += relocation; @@ -132,25 +109,18 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, return 0; } -int apply_relocate(Elf32_Shdr *sechdrs, - const char *strtab, - unsigned int symindex, - unsigned int relsec, - struct module *me) -{ - printk(KERN_ERR "module %s: REL RELOCATION unsupported\n", - me->name); - return -ENOEXEC; -} - int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) { - return module_bug_finalize(hdr, sechdrs, me); + int ret = 0; + + ret |= module_dwarf_finalize(hdr, sechdrs, me); + + return ret; } void module_arch_cleanup(struct module *mod) { - module_bug_cleanup(mod); + module_dwarf_cleanup(mod); } |
