[RFA] Fix gold's understanding of ARM v4T/v5T interworking
Matthew Gretton-Dann
matthew.gretton-dann@arm.com
Mon Sep 26 14:48:00 GMT 2011
Hi,
Whilst preparing a patch for gold to work around an issue on ARM1176
CPUs (forthcoming) I noticed that gold doesn't correctly identify
between v4T and v5T. In particular:
* It assumes BLX is available on v4T - it is not, BLX is only
available from v5T.
* It therefore assumes that using the availability of BLX is a good
test for whether --fix-v4bx-interworking is also available.
The attached patch fixes these two issues by splitting the
Target_arm::may_use_blx() function into two:
* Target_arm::may_use_v4t_interworking()
* Target_arm::may_use_v5t_interworking()
The tests which previous checked may_use_blx() are then directed to use
one of the appropriate may_use_v#t_interworking queries.
I also ported some of the ld-arm/farcall* tests to gold in order to test
these fixes.
Tested on arm-none-eabi.
Can someone please review?
Thanks,
Matt
gold/ChangeLog:
2011-09-20 Matthew Gretton-Dann<matthew.gretton-dann@arm.com>
* arm.cc (Target_arm::Target_arm): Remove initialisation of
may_use_blx_
(Target_arm::may_use_blx): Remove method.
(Target_arm::set_may_use_blx): Likewise.
(Target_arm::may_use_v4t_interworking): New method.
(Target_arm::may_use_v5t_interworking): Likewise.
(Target_arm::may_use_blx_): Remove member variable.
(Arm_relocate_functions::arm_branch_common): Check for v5T
interworking.
(Arm_relocate_functions::thumb_branch_common): Likewise.
(Reloc_stub::stub_type_for_reloc): Likewise.
(Target_arm::do_finalize_sections): Correct interworking checks.
* testsuite/Makefile.am: Add new tests.
* testsuite/Makefile.in: Regenerate.
* testsuite/arm_farcall_arm_arm.s: New test.
* testsuite/arm_farcall_arm_arm.sh: Likewise.
* testsuite/arm_farcall_arm_thumb.s: Likewise.
* testsuite/arm_farcall_arm_thumb.sh: Likewise.
* testsuite/arm_farcall_thumb_arm.s: Likewise.
* testsuite/arm_farcall_thumb_arm.sh: Likewise.
* testsuite/arm_farcall_thumb_thumb.s: Likewise.
* testsuite/arm_farcall_thumb_thumb.sh: Likewise.
--
Matthew Gretton-Dann
Principal Engineer, PD Software - Tools, ARM Ltd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1109-Add-may_use_v-45-t_interworking-functions.patch
Type: text/x-patch
Size: 32706 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20110926/a72009ed/attachment.bin>
More information about the Binutils
mailing list