mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
2df2751d19
2016-09-28 Christophe Lyon <christophe.lyon@linaro.org> PR ld/20608 bfd/ * elf32-arm.c (arm_type_of_stub): Handle the case when the pre-PLT Thumb-ARM stub is too far. ld * testsuite/ld-arm/arm-elf.exp: Handle new testcase. * testsuite/ld-arm/farcall-mixed-app2.d: New file. * testsuite/ld-arm/farcall-mixed-app2.r: Likewise. * testsuite/ld-arm/farcall-mixed-app2.s: Likewise. * testsuite/ld-arm/farcall-mixed-app2.sym: Likewise.
77 lines
1.1 KiB
ArmAsm
77 lines
1.1 KiB
ArmAsm
.text
|
|
.p2align 4
|
|
.globl _start
|
|
_start:
|
|
mov ip, sp
|
|
stmdb sp!, {r11, ip, lr, pc}
|
|
bl app_func
|
|
bl lib_func1
|
|
bl lib_func2
|
|
ldmia sp, {r11, sp, lr}
|
|
bx lr
|
|
|
|
.p2align 4
|
|
.globl app_tfunc_close
|
|
.type app_tfunc_close,%function
|
|
.thumb_func
|
|
.code 16
|
|
app_tfunc_close:
|
|
push {lr}
|
|
bl lib_func2
|
|
pop {pc}
|
|
bx lr
|
|
|
|
@ We will place the section .mid_thumb at 0xFFFEF8.
|
|
@ Just far enough for XXXX
|
|
.section .mid_thumb, "xa"
|
|
|
|
.p2align 4
|
|
.globl mid_tfunc
|
|
.type mid_tfunc,%function
|
|
.thumb_func
|
|
.code 16
|
|
mid_tfunc:
|
|
.syntax unified
|
|
.space 24
|
|
b.w lib_func2
|
|
b.w lib_func2
|
|
|
|
@ We will place the section .far_arm at 0x2100000.
|
|
.section .far_arm, "xa"
|
|
|
|
.arm
|
|
.p2align 4
|
|
.globl app_func
|
|
.type app_func,%function
|
|
app_func:
|
|
mov ip, sp
|
|
stmdb sp!, {r11, ip, lr, pc}
|
|
bl lib_func1
|
|
bl lib_func2
|
|
ldmia sp, {r11, sp, lr}
|
|
bx lr
|
|
|
|
.arm
|
|
.p2align 4
|
|
.globl app_func2
|
|
.type app_func2,%function
|
|
app_func2:
|
|
bx lr
|
|
|
|
@ We will place the section .far_thumb at 0x2200000.
|
|
.section .far_thumb, "xa"
|
|
|
|
.p2align 4
|
|
.globl app_tfunc
|
|
.type app_tfunc,%function
|
|
.thumb_func
|
|
.code 16
|
|
app_tfunc:
|
|
push {lr}
|
|
bl lib_func2
|
|
pop {pc}
|
|
bx lr
|
|
|
|
.data
|
|
.long data_obj
|