glibc/sysdeps/s390/s390-64
Stefan Liebler dd8f8da99d S390: Use DT_JUMPREL in prelink undo code.
On s390, the current prelink undo code in elf_machine_lazy_rel()
has the requirement, that the plt stubs use the first got slots
after the 3 reserved ones.

In case of undoing prelink, the plt got slots are reset to the correct
addresses whithin the corresponding plt-stub. Therefore the address
is calculated by the address of the first plt-stub-address which
was written by prelink (see l->l_mach.plt) to got[1] and index of
current relocation multiplied with 32 (=size of one plt slot).
The index was calculated with &current-got-slot - &got[3].

This patch removes the requirement, that the plt-got-slots are
starting at got[3]. The index is now calculated with
&current-reloc - &reloc[0]. The first struct Elf64_Rela is stored
at DT_JMPREL.

This patch is needed to prepare for partial relro support.

Ulrich Weigand suggested this approach to use DT_JMPREL - Thanks.

ChangeLog:

	* 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 15:22:35 +02:00
..
bits S390: Define SIZE_MAX as unsigned long (BZ #16712). 2014-03-24 16:59:01 +01:00
multiarch S390: Implement mempcpy with help of memcpy. [BZ #19765] 2016-05-24 10:39:13 +02:00
__longjmp.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
add_n.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
backtrace.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
bcopy.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
bsd-_setjmp.S
bsd-setjmp.S
bzero.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
crti.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-machine.h S390: Use DT_JUMPREL in prelink undo code. 2016-07-06 15:22:35 +02:00
dl-trampoline.h S390: Extend structs La_s390_regs / La_s390_retval with vector-registers. 2016-03-31 17:37:16 +02:00
dl-trampoline.S S390: Save and restore fprs/vrs while resolving symbols. 2016-03-31 17:37:16 +02:00
Implies
Makefile S390: Use s390-64 specific ionv-modules on s390-32, too. 2016-05-25 17:18:05 +02:00
memchr.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memcmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memcpy.S S390: Implement mempcpy with help of memcpy. [BZ #19765] 2016-05-24 10:39:13 +02:00
memset.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
s390x-mcount.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
stackguard-macros.h S390: Use __asm__ instead of asm. 2015-11-20 08:56:40 +01:00
start.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strcmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strcpy.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
strncpy.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sub_n.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tls-macros.h S390: Use __asm__ instead of asm. 2015-11-20 08:56:40 +01:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00