]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Arm: Fix thumb2 PLT branch offsets.
authorTamar Christina <tamar.christina@arm.com>
Wed, 1 Apr 2020 09:40:07 +0000 (10:40 +0100)
committerTamar Christina <tamar.christina@arm.com>
Wed, 8 Apr 2020 17:29:16 +0000 (18:29 +0100)
commit97f92b3e90a41cad48a7ed3587e87989682ff9c8
tree55233a487016b6d8ce2a9424f3d0d7cff9185d72
parent99b7604ff63f3ec23d39d87751948066111bfd5e
Arm: Fix thumb2 PLT branch offsets.

When I previously changed these offsets I had incorrectly used an offset of -2
for this Thumb2 PLT.  Unfortunately because we had no tests for this PLT I had
missed that the result was incorrect.

This patch fixes the offset to PC .-4 so that it correctly addresses the
previous instruction and adds a test for this PLT stub.

bfd/ChangeLog:

* elf32-arm.c (elf32_thumb2_plt_entry): Fix PC-rel offset.

ld/ChangeLog:

* testsuite/ld-arm/arm-elf.exp (thumb-plt): New.
* testsuite/ld-arm/thumb-plt.d: New test.
* testsuite/ld-arm/thumb-plt.s: New test.

(cherry picked from commit 15ccbdd717530f81f545a716f0df1de62aee1157)
(cherry picked from commit 3ce23ca1de4c769c4b7247f0724a10ef5fb24a11)
bfd/ChangeLog
bfd/elf32-arm.c
ld/ChangeLog
ld/testsuite/ld-arm/arm-elf.exp
ld/testsuite/ld-arm/thumb-plt.d [new file with mode: 0644]
ld/testsuite/ld-arm/thumb-plt.s [new file with mode: 0644]