]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
2006-12-01 Paul Brook <paul@codesourcery.com>
authorPaul Brook <paul@codesourcery.com>
Fri, 1 Dec 2006 16:45:27 +0000 (16:45 +0000)
committerPaul Brook <paul@codesourcery.com>
Fri, 1 Dec 2006 16:45:27 +0000 (16:45 +0000)
Backport from mainline.
gas/
* config/tc-arm.c (arm_force_relocation): Return 1 for relocs against
function symbols.

gas/testsuite/
* gas/arm/thumbrel.s: New test.
* gas/arm/thumbrel.d: New test.

ChangeLog.csl
gas/config/tc-arm.c

index 792916e7cacb94c59f2ca2122e7fdc2d5b80d166..87edd04e078eaacc33c2852dd0d45f2c8dfd46b4 100644 (file)
@@ -1,3 +1,14 @@
+2006-12-01  Paul Brook  <paul@codesourcery.com>
+
+       Backport from mainline.
+       gas/
+       * config/tc-arm.c (arm_force_relocation): Return 1 for relocs against
+       function symbols.
+
+       gas/testsuite/
+       * gas/arm/thumbrel.s: New test.
+       * gas/arm/thumbrel.d: New test.
+
 2006-12-01  Kazu Hirata  <kazu@codesourcery.com>
 
        bfd/
index 18437e5bd0f526a963e59a19824b688022b37b0b..dfaa6432fe662a20f100f1f3280ddc9c13b0a243 100644 (file)
@@ -18905,6 +18905,12 @@ arm_force_relocation (struct fix * fixp)
       || fixp->fx_r_type == BFD_RELOC_ARM_LDR_PC_G0)
     return 1;
 
+  /* Always generate relocations against function symbols.  */
+  if (fixp->fx_r_type == BFD_RELOC_32
+      && fixp->fx_addsy
+      && (symbol_get_bfdsym (fixp->fx_addsy)->flags & BSF_FUNCTION))
+    return 1;
+
   return generic_force_reloc (fixp);
 }