X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fs390%2Fkernel%2Fmodule.c;h=607d506689c8155cb9762a2824f6be1861460184;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=bae6e488b679991623fa83a6383309070e03a254;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/s390/kernel/module.c b/arch/s390/kernel/module.c index bae6e488b..607d50668 100644 --- a/arch/s390/kernel/module.c +++ b/arch/s390/kernel/module.c @@ -277,7 +277,8 @@ apply_rela(Elf_Rela *rela, Elf_Addr base, Elf_Sym *symtab, *(unsigned int *) loc = val; else if (r_type == R_390_GOTENT || r_type == R_390_GOTPLTENT) - *(unsigned int *) loc = val >> 1; + *(unsigned int *) loc = + (val + (Elf_Addr) me->module_core - loc) >> 1; else if (r_type == R_390_GOT64 || r_type == R_390_GOTPLT64) *(unsigned long *) loc = val; @@ -395,8 +396,7 @@ int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *me) { - if (me->arch.syminfo) - vfree(me->arch.syminfo); + vfree(me->arch.syminfo); return 0; }