X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fparisc%2Fkernel%2Fmodule.c;h=fdacdd4341c9f3ccf3189afe683b7179ead823d4;hb=2d9b57fbec9fde4deea3686f3927204efa218c7f;hp=f50b982b0834ce8b2598d1b66d1c06b5306ca29f;hpb=c730f5b621afa33e9f4939da9078669162ebff4e;p=linux-2.6 diff --git a/arch/parisc/kernel/module.c b/arch/parisc/kernel/module.c index f50b982b08..fdacdd4341 100644 --- a/arch/parisc/kernel/module.c +++ b/arch/parisc/kernel/module.c @@ -46,6 +46,7 @@ #include #include #include +#include #include @@ -96,7 +97,7 @@ static inline int in_local_section(struct module *me, void *loc, void *dot) } -#ifndef __LP64__ +#ifndef CONFIG_64BIT struct got_entry { Elf32_Addr addr; }; @@ -176,7 +177,7 @@ void *module_alloc(unsigned long size) return vmalloc(size); } -#ifndef __LP64__ +#ifndef CONFIG_64BIT static inline unsigned long count_gots(const Elf_Rela *rela, unsigned long n) { return 0; @@ -319,7 +320,7 @@ int module_frob_arch_sections(CONST Elf_Ehdr *hdr, return 0; } -#ifdef __LP64__ +#ifdef CONFIG_64BIT static Elf64_Word get_got(struct module *me, unsigned long value, long addend) { unsigned int i; @@ -342,9 +343,9 @@ static Elf64_Word get_got(struct module *me, unsigned long value, long addend) value); return i * sizeof(struct got_entry); } -#endif /* __LP64__ */ +#endif /* CONFIG_64BIT */ -#ifdef __LP64__ +#ifdef CONFIG_64BIT static Elf_Addr get_fdesc(struct module *me, unsigned long value) { Elf_Fdesc *fdesc = me->module_core + me->arch.fdesc_offset; @@ -368,7 +369,7 @@ static Elf_Addr get_fdesc(struct module *me, unsigned long value) fdesc->gp = (Elf_Addr)me->module_core + me->arch.got_offset; return (Elf_Addr)fdesc; } -#endif /* __LP64__ */ +#endif /* CONFIG_64BIT */ enum elf_stub_type { ELF_STUB_GOT, @@ -394,7 +395,7 @@ static Elf_Addr get_stub(struct module *me, unsigned long value, long addend, i * sizeof(struct stub_entry); } -#ifndef __LP64__ +#ifndef CONFIG_64BIT /* for 32-bit the stub looks like this: * ldil L'XXX,%r1 * be,n R'XXX(%sr4,%r1) @@ -472,7 +473,7 @@ int apply_relocate(Elf_Shdr *sechdrs, return -ENOEXEC; } -#ifndef __LP64__ +#ifndef CONFIG_64BIT int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab, unsigned int symindex, @@ -822,7 +823,8 @@ int module_finalize(const Elf_Ehdr *hdr, me->name, strtab, symhdr); if(me->arch.got_count > MAX_GOTS) { - printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d\n", me->name, me->arch.got_count, MAX_GOTS); + printk(KERN_ERR "%s: Global Offset Table overflow (used %ld, allowed %d)\n", + me->name, me->arch.got_count, MAX_GOTS); return -EINVAL; } @@ -850,10 +852,11 @@ int module_finalize(const Elf_Ehdr *hdr, nsyms = newptr - (Elf_Sym *)symhdr->sh_addr; DEBUGP("NEW num_symtab %lu\n", nsyms); symhdr->sh_size = nsyms * sizeof(Elf_Sym); - return 0; + return module_bug_finalize(hdr, sechdrs, me); } void module_arch_cleanup(struct module *mod) { deregister_unwind_table(mod); + module_bug_cleanup(mod); }