[Patch ARM] Fix branches and calls for local functions in the assembler.
Ramana Radhakrishnan
ramana.radhakrishnan@arm.com
Tue Mar 31 14:24:00 GMT 2009
Hi,
This patch is in continuation to the patch that was submitted at
http://sourceware.org/ml/binutils/2009-03/msg00476.html. Here's a patch that
fixes up b<cond>, bl<cond>, blx to local functions across ISA modes in line
with what happens with global functions for both ARM and Thumb mode.
Tested by building arm-none-eabi cross and verifying no regressions.
Ok to commit ?
Cheers
Ramana
2009-03-31 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* config\tc-arm.h: Fix typo in comment.
(ARM_IS_FUNC): New macro.
(MD_APPLY_SYM_VALUE): Define.
* config\tc-arm.c (do_blx): Retain BFD_RELOC_ARM_PCREL_BLX for
all versions of EABI.
(do_t_blx): Retain BFD_RELOC_THUMB_PCREL_BLX for all versions
of EABI.
(relax_branch): Do not relax for branches to ARM functions.
(md_pcrel_from_section): Set up base correctly for
BFD_RELOC_THUMB_PCREL_BLX
BFD_RELOC_THUMB_PCREL_CALL, BFD_RELOC_THUMB_PCREL_BRANCH23,
BFD_RELOC_ARM_PCREL_BLX
BFD_RELOC_ARM_PCREL_CALL.
(md_apply_fix): Flip bl to blx where possible.
Flip blx to bl where possible.
(arm_force_relocation): Force relocations for
BFD_RELOC_ARM_PCREL_JUMP, BFD_RELOC_ARM_PCREL_JUMP,
BFD_RELOC_ARM_PCREL_BLX, BFD_RELOC_THUMB_PCREL_BLX,
BFD_RELOC_THUMB_PCREL_BRANCH20, BFD_RELOC_THUMB_PCREL_BRANCH23,
BFD_RELOC_THUMB_PCREL_BRANCH25.
(arm_apply_sym_value): New function.
2009-03-31 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
* gas\arm\bl-local-v4t.d: New file.
* gas\arm\bl-local-v4t.s: New file.
* gas\arm\blx-local.s: Update for branches and calls to local
functions.
* gas\arm\blx-local.d: Likewise.
* gas\arm\blx-local.l: New file.
* gas\arm\blx-local-thumb.l: New file.
* gas\arm\blx-local-thumb.s: New file.
* gas\arm\blx-local-thumb.d: New file.
Ramana Radhakrishnan
GNU Tools Engineer
ARM Ltd. (www.arm.com)
Phone : +441223400495 (Direct || Voicemail)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: add-warnings-for-bl
Type: application/octet-stream
Size: 21966 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20090331/24572cc5/attachment.obj>
More information about the Binutils
mailing list