old-cross-binutils/ld/testsuite/ld-arm/farcall-mixed-app.s
Christophe Lyon 5fa9e92f74 2009-03-05 Christophe Lyon <christophe.lyon@st.com>
bfd/
	* elf32-arm.c (arm_type_of_stub): Handle long branches targetting
	PLT entries.
	(elf32_arm_final_link_relocate): Likewise.

	testsuite/
	* ld-arm/arm-elf.exp: Add 2 more tests to check long branch stubs
	in PLT context.
	* ld-arm/farcall-mixed-app-v5.d: New file.
	* ld-arm/farcall-mixed-app.d: Likewise.
	* ld-arm/farcall-mixed-app.r: Likewise.
	* ld-arm/farcall-mixed-app.s: Likewise.
	* ld-arm/farcall-mixed-app.sym: Likewise.
	* ld-arm/farcall-mixed-lib.d: Likewise.
	* ld-arm/farcall-mixed-lib.r: Likewise.
2009-03-05 17:28:21 +00:00

58 lines
839 B
ArmAsm

.text
.p2align 4
.globl _start
_start:
mov ip, sp
stmdb sp!, {r11, ip, lr, pc}
bl app_func
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 .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
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