S390: Use DT_JUMPREL in prelink undo code.
[platform/upstream/glibc.git] / sysdeps / s390 / s390-32 / dl-machine.h
index ec0ae4a..0a58897 100644 (file)
@@ -109,7 +109,7 @@ elf_machine_runtime_setup (struct link_map *l, int lazy, int profile)
       if (got[1])
        {
          l->l_mach.plt = got[1] + l->l_addr;
-         l->l_mach.gotplt = (Elf32_Addr) &got[3];
+         l->l_mach.jmprel = (const Elf32_Rela *) D_PTR (l, l_info[DT_JMPREL]);
        }
       got[1] = (Elf32_Addr) l; /* Identify this shared object.  */
 
@@ -506,9 +506,7 @@ elf_machine_lazy_rel (struct link_map *map,
       if (__builtin_expect (map->l_mach.plt, 0) == 0)
        *reloc_addr += l_addr;
       else
-       *reloc_addr =
-         map->l_mach.plt
-         + (((Elf32_Addr) reloc_addr) - map->l_mach.gotplt) * 8;
+       *reloc_addr = map->l_mach.plt + (reloc - map->l_mach.jmprel) * 32;
     }
   else if (__glibc_likely (r_type == R_390_IRELATIVE))
     {