old-cross-binutils/ld/testsuite/ld-arm/farcall-cond-thumb-arm.s
Terry Guo c542398150 bfd/ChangeLog
2014-08-21  Tony Wang  <tony.wang@arm.com>

	* elf32-arm.c (elf32_arm_final_link_relocate): Implement
	the veneer routine for R_ARM_THM_JUMP19.
	(arm_type_of_stub): Add conditional clause for R_ARM_THM_JUMP19
	(elf32_arm_size_stub): Ditto.

ld/testsuite/ChangeLog
2014-08-21  Tony Wang  <tony.wang@arm.com>

	* ld-arm/jump-reloc-veneers-cond.s: New test.
	* ld-arm/farcall-cond-thumb-arm.s: Ditto.
	* ld-arm/jump-reloc-veneers-cond-short.d: Expected output
	for target without a veneer generation.
	* ld-arm/jump-reloc-veneers-cond-long.d: Expected output
	for target with a veneer generation.
	* ld-arm/farcall-cond-thumb-arm.d: Expected output for
	inter working veneer generation.
	* ld-arm/arm-elf.exp: Add tests for conditional branch veneer.
2014-08-21 18:00:35 +08:00

27 lines
510 B
ArmAsm

@ Test to ensure that a Thumb to ARM call exceeding 4Mb generates a stub.
@ Check that we can generate two types of stub in the same section.
.global _start
.syntax unified
@ We will place the section .text at 0x1c01010.
.text
.thumb_func
_start:
.global bar
bne bar
@ This call is close enough to generate a "short branch" stub
@ or no stub if blx is available.
.space 0x050000
bne bar
@ We will place the section .foo at 0x2001014.
.section .foo, "xa"
.arm
.type bar, %function
bar:
bx lr