aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2011-04-12 11:47:38 +0000
committerNick Clifton <nickc@redhat.com>2011-04-12 11:47:38 +0000
commit0d9b4b55c2c581697804e659eecadeaa1c4f97da (patch)
tree44e90d943e377bff12e60fec4d30f9806e4c6e37 /gas
parent24c861152241bb83d0dbd8dba3698af57472a056 (diff)
downloadgdb-0d9b4b55c2c581697804e659eecadeaa1c4f97da.zip
gdb-0d9b4b55c2c581697804e659eecadeaa1c4f97da.tar.gz
gdb-0d9b4b55c2c581697804e659eecadeaa1c4f97da.tar.bz2
PR gas/12532
* config/tc-arm.c (relax_branch): Do not relax branches to preemptable global symbols.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-arm.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index dc2337e..e8c9ebe 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-12 Nick Clifton <nickc@redhat.com>
+
+ PR gas/12532
+ * config/tc-arm.c (relax_branch): Do not relax branches to
+ preemptable global symbols.
+
2011-04-11 Julian Brown <julian@codesourcery.com>
* config/tc-arm.c (parse_psr): Add LHS argument. Improve support
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index ae9ba18..736693e 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -19075,6 +19075,12 @@ relax_branch (fragS *fragp, asection *sec, int bits, long stretch)
if (S_IS_DEFINED (fragp->fr_symbol)
&& ARM_IS_FUNC (fragp->fr_symbol))
return 4;
+
+ /* PR 12532. Global symbols with default visibility might
+ be preempted, so do not relax relocations to them. */
+ if ((ELF_ST_VISIBILITY (S_GET_OTHER (fragp->fr_symbol)) == STV_DEFAULT)
+ && (! S_IS_LOCAL (fragp->fr_symbol)))
+ return 4;
#endif
val = relaxed_symbol_addr (fragp, stretch);