mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
15ccbdd717
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.
19 lines
240 B
ArmAsm
19 lines
240 B
ArmAsm
.cpu cortex-m3
|
|
.text
|
|
.align 1
|
|
.global bar
|
|
.arch armv7-m
|
|
.syntax unified
|
|
.thumb
|
|
.thumb_func
|
|
.fpu softvfp
|
|
.type bar, %function
|
|
bar:
|
|
push {r7, lr}
|
|
add r7, sp, #0
|
|
bl foo(PLT)
|
|
mov r3, r0
|
|
mov r0, r3
|
|
pop {r7, pc}
|
|
.size bar, .-bar
|