]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix Thumb-2 BL detection
authorThomas Preud'homme <thomas.preudhomme@arm.com>
Thu, 22 Sep 2016 15:37:38 +0000 (16:37 +0100)
committerThomas Preud'homme <thomas.preudhomme@arm.com>
Thu, 22 Sep 2016 15:45:37 +0000 (16:45 +0100)
commit10f612b5002a9c2ecbe3ae4205d4eab413771f0a
tree1c29f4f0ae8a648a0d5234b493d2710a19fb40f6
parenta08f609340d6d2b69d981f72b7900398f3816346
Fix Thumb-2 BL detection

2016-09-22  Andre Vieira  <andre.simoesdiasvieira@arm.com>

Backport from mainline
2016-07-01  Thomas Preud'homme  <thomas.preudhomme@arm.com>

bfd/
* elf32-arm.c (using_thumb2_bl): New function.
(arm_type_of_stub): Declare thumb2 variable together and change type
to bfd_boolean.  Use using_thumb2_bl () to determine whether
THM_MAX_FWD_BRANCH_OFFSET or THM2_MAX_FWD_BRANCH_OFFSET should be
checked for BL range.
(elf32_arm_final_link_relocate): Use using_thumb2_bl () to determine
the bit size of BL offset.

ld/
* testsuite/ld-arm/arm-elf.exp (Thumb-2 BL): Assemble for ARMv7.
(Thumb-2 BL on ARMv6-M): New testcase.
* testsuite/ld-arm/thumb2-bl.d: Do not try to match testcase filename.
* testsuite/ld-arm/thumb2-bl.s: Do not select architecture.
bfd/ChangeLog.arm
bfd/elf32-arm.c
ld/ChangeLog.arm
ld/testsuite/ld-arm/arm-elf.exp
ld/testsuite/ld-arm/thumb2-bl.d
ld/testsuite/ld-arm/thumb2-bl.s