summaryrefslogtreecommitdiff
path: root/gas/config/tc-mn10300.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2004-05-28 21:33:07 +0000
committerDJ Delorie <dj@redhat.com>2004-05-28 21:33:07 +0000
commit53cb0362bf2181b1fe1611954529c3bb0649d0af (patch)
tree04b96a83d9afe4a2a63f08c892a76f4a34a5a33b /gas/config/tc-mn10300.c
parent5dd23ec18b479cbc2150f28168a1b95fd4e80aaa (diff)
* config/tc-mn10300.h (tc_fix_adjustable): Define.
* config/tc-mn10300.c (mn10300_fix_adjustable): Don't adjust debug or non-merged symbols.
Diffstat (limited to 'gas/config/tc-mn10300.c')
-rw-r--r--gas/config/tc-mn10300.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c
index 36e6a058ac..ea5b533dec 100644
--- a/gas/config/tc-mn10300.c
+++ b/gas/config/tc-mn10300.c
@@ -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;
}