Fix PLT first entry GOT operand calculation.
authorAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Tue, 7 Jun 2016 14:45:15 +0000 (16:45 +0200)
committerAndreas Krebbel <krebbel@linux.vnet.ibm.com>
Tue, 7 Jun 2016 14:47:10 +0000 (16:47 +0200)
commit161db2790500827b74ef835ebe515dce04021316
tree1c29a0c7865c5be502dc3ff90409ebf6d6063700
parent14b57c7c6a53c747a8819fed3da858eae4195a0e
Fix PLT first entry GOT operand calculation.

Embedding the .plt section in another revealed a bug in the way the
larl operand of the first magic plt entry is being calculated.  Fixed
with the attached patch.

bfd/ChangeLog:

* elf64-s390.c (elf_s390_finish_dynamic_sections): Subtract plt
section offset when calculation the larl operand in the first PLT
entry.

ld/ChangeLog:

* testsuite/ld-s390/pltoffset-1.dd: New test.
* testsuite/ld-s390/pltoffset-1.ld: New test.
* testsuite/ld-s390/pltoffset-1.s: New test.
* testsuite/ld-s390/s390.exp: Run new test.
bfd/ChangeLog
bfd/elf64-s390.c
ld/ChangeLog
ld/testsuite/ld-s390/pltoffset-1.dd [new file with mode: 0644]
ld/testsuite/ld-s390/pltoffset-1.ld [new file with mode: 0644]
ld/testsuite/ld-s390/pltoffset-1.s [new file with mode: 0644]
ld/testsuite/ld-s390/s390.exp