]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* config/tc-mn10300.h (tc_fix_adjustable): Define.
authorDJ Delorie <dj@redhat.com>
Fri, 28 May 2004 21:33:07 +0000 (21:33 +0000)
committerDJ Delorie <dj@redhat.com>
Fri, 28 May 2004 21:33:07 +0000 (21:33 +0000)
* config/tc-mn10300.c (mn10300_fix_adjustable): Don't adjust debug
or non-merged symbols.

gas/ChangeLog
gas/config/tc-mn10300.c
gas/config/tc-mn10300.h

index a3c5a085b35741be72c21b6f066502c40b8db551..3f4b71f8664c6422b211ae31b1e410f1ad0f572e 100644 (file)
@@ -1,3 +1,9 @@
+2004-05-28  DJ Delorie  <dj@redhat.com>
+
+       * config/tc-mn10300.h (tc_fix_adjustable): Define.
+       * config/tc-mn10300.c (mn10300_fix_adjustable): Don't adjust debug
+       or non-merged symbols.
+
 2004-05-28  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config/tc-ia64.c (remove_marked_resource): Save, clear and
index 36e6a058ace2f21bc2944e44d65db7b578f88538..ea5b533dec10d0271fcee9b33a58cd2daf492718 100644 (file)
@@ -2542,6 +2542,15 @@ mn10300_fix_adjustable (fixp)
   if (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_CODE)
     return 0;
 
+  /* Likewise, do not adjust symbols that won't be merged, or debug
+     symbols, because they too break relaxation.  We do want to adjust
+     other mergable symbols, like .rodata, because code relaxations
+     need section-relative symbols to properly relax them.  */
+  if (! (S_GET_SEGMENT(fixp->fx_addsy)->flags & SEC_MERGE))
+    return 0;
+  if (strncmp (S_GET_SEGMENT (fixp->fx_addsy)->name, ".debug", 6) == 0)
+    return 0;
+
   return 1;
 }
 
index 1b88cf2d908d76073b13d896ed3abf2f7fc6464b..9e37ea635afc0ad29e128c494208cb18d209f052 100644 (file)
@@ -102,8 +102,8 @@ void mn10300_cons_fix_new PARAMS ((fragS *, int, int, expressionS *));
 #define md_number_to_chars number_to_chars_littleendian
 
 /* Don't bother to adjust relocs.  */
-#define tc_fix_adjustable(FIX) 0
-/* #define tc_fix_adjustable(FIX) mn10300_fix_adjustable (FIX) */
+/* #define tc_fix_adjustable(FIX) 0 */
+#define tc_fix_adjustable(FIX) mn10300_fix_adjustable (FIX)
 extern bfd_boolean mn10300_fix_adjustable PARAMS ((struct fix *));
 
 /* We do relaxing in the assembler as well as the linker.  */