patch for arm_force_relocation

Philip Blundell pb@nexus.co.uk
Wed Apr 2 14:22:00 GMT 2003


A testcase like this:

.globl foo
foo: .word 0
ldr r0, foo

fails to assemble on arm-linux with the code in the current HEAD.  The
appended patch seems to fix it.

p.

2003-04-02  Philip Blundell  <philb@gnu.org>

	* config/tc-arm.c (arm_force_relocation): Return 0 for OFFSET_IMM.

Index: config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.139
diff -u -r1.139 tc-arm.c
--- config/tc-arm.c	1 Apr 2003 13:08:05 -0000	1.139
+++ config/tc-arm.c	2 Apr 2003 14:16:01 -0000
@@ -12475,6 +12475,7 @@
 
   /* Resolve these relocations even if the symbol is extern or weak.  */
   if (fixp->fx_r_type == BFD_RELOC_ARM_IMMEDIATE
+      || fixp->fx_r_type == BFD_RELOC_ARM_OFFSET_IMM
       || fixp->fx_r_type == BFD_RELOC_ARM_ADRL_IMMEDIATE)
     return 0;
 





More information about the Binutils mailing list