patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / arch / s390 / kernel / module.c
index bae6e48..a15f297 100644 (file)
@@ -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;