This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch ARM] Fix branches and calls for local functions in the assembler.


On Tue, 2009-03-31 at 15:24 +0100, Ramana Radhakrishnan wrote:
> 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.

There are some stray blank lines in this patch:

Here:
@@ -18146,6 +18146,7 @@ md_pcrel_from_section (fixS * fixP, segT
              )))
     base = 0;
 
+
   switch (fixP->fx_r_type)
     {
       /* PC relative addressing on the Thumb is slightly odd as the


here:

-    case BFD_RELOC_THUMB_PCREL_BRANCH23:
+
     case BFD_RELOC_THUMB_PCREL_BRANCH25:

here:
@@ -18954,7 +19007,30 @@ md_apply_fix (fixS *   fixP,
       goto arm_branch_common;
 
     case BFD_RELOC_ARM_PCREL_BLX:
+

here:

@@ -19066,7 +19152,57 @@ md_apply_fix (fixS *   fixP,
       break;
 
     case BFD_RELOC_THUMB_PCREL_BLX:
+

here:
@@ -19911,6 +20047,7 @@ arm_validate_fix (fixS * fixP)
 }
 #endif
 
+
 int
 arm_force_relocation (struct fix * fixp)
 {

here:
@@ -21555,4 +21720,39 @@ arm_convert_symbolic_attribute (const ch
 
   return -1;
 }
+

here:
 #endif /* OBJ_ELF */
+
+


Otherwise, this is OK.

R.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]