+2016-07-06 Stefan Liebler <stli@linux.vnet.ibm.com>
+
+ * sysdeps/s390/linkmap.h (struct link_map_machine):
+ Remove member gotplt and add member jmprel.
+ * sysdeps/s390/s390-32/dl-machine.h
+ (elf_machine_runtime_setup): Setup member jmprel with DT_JMPREL
+ instead of gotplt with &got[3].
+ (elf_machine_lazy_rel): Calculate address with reloc and jmprel.
+ * sysdeps/s390/s390-64/dl-machine.h: Likewise.
+
2016-07-06 John David Anglin <danglin@gcc.gnu.org>
* sysdeps/hppa/fpu/libm-test-ulps: Regenerate.
struct link_map_machine
{
Elf64_Addr plt; /* Address of .plt + 0x2e */
- Elf64_Addr gotplt; /* Address of .got + 0x18 */
+ const Elf64_Rela *jmprel; /* Address of first JMP_SLOT reloc */
};
#else
struct link_map_machine
{
Elf32_Addr plt; /* Address of .plt + 0x2c */
- Elf32_Addr gotplt; /* Address of .got + 0x0c */
+ const Elf32_Rela *jmprel; /* Address of first JMP_SLOT reloc */
};
#endif
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. */
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))
{
if (got[1])
{
l->l_mach.plt = got[1] + l->l_addr;
- l->l_mach.gotplt = (Elf64_Addr) &got[3];
+ l->l_mach.jmprel = (const Elf64_Rela *) D_PTR (l, l_info[DT_JMPREL]);
}
got[1] = (Elf64_Addr) l; /* Identify this shared object. */
if (__builtin_expect (map->l_mach.plt, 0) == 0)
*reloc_addr += l_addr;
else
- *reloc_addr =
- map->l_mach.plt
- + (((Elf64_Addr) reloc_addr) - map->l_mach.gotplt) * 4;
+ *reloc_addr = map->l_mach.plt + (reloc - map->l_mach.jmprel) * 32;
}
else if (__glibc_likely (r_type == R_390_IRELATIVE))
{