summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Brook <paul@codesourcery.com>2006-12-01 16:45:27 +0000
committerPaul Brook <paul@codesourcery.com>2006-12-01 16:45:27 +0000
commitca1046879466057693c4962529d717402fff4d30 (patch)
treea3e8a98175ffdbb35b01390eed511c24ebfc1b85
parent2219f2b3715ddbee477ded32d5b2af06737f3464 (diff)
downloadbinutils-gdb-ca1046879466057693c4962529d717402fff4d30.tar.gz
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.
-rw-r--r--ChangeLog.csl11
-rw-r--r--gas/config/tc-arm.c6
2 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog.csl b/ChangeLog.csl
index 792916e7cac..87edd04e078 100644
--- a/ChangeLog.csl
+++ b/ChangeLog.csl
@@ -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/
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 18437e5bd0f..dfaa6432fe6 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -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);
}