[PATCH 6/9] gas: Don't relax relocations to public symbols

Martin Storsjo martin@martin.st
Wed May 1 23:39:00 GMT 2013


This matches a similar condition for elf.

I guess this can be done in general and not only for the arm-mingw32
target?
---
 gas/config/tc-arm.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 543e01b..373db62 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -20242,6 +20242,9 @@ relax_branch (fragS *fragp, asection *sec, int bits, long stretch)
   if ((ELF_ST_VISIBILITY (S_GET_OTHER (fragp->fr_symbol)) == STV_DEFAULT)
       && (! S_IS_LOCAL (fragp->fr_symbol)))
     return 4;
+#else
+  if (! S_IS_LOCAL (fragp->fr_symbol))
+    return 4;
 #endif
 
   val = relaxed_symbol_addr (fragp, stretch);
-- 
1.7.9.4



More information about the Binutils mailing list