diff options
author | DJ Delorie <dj@redhat.com> | 2004-05-28 21:33:07 +0000 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2004-05-28 21:33:07 +0000 |
commit | 53cb0362bf2181b1fe1611954529c3bb0649d0af (patch) | |
tree | 04b96a83d9afe4a2a63f08c892a76f4a34a5a33b | |
parent | 5dd23ec18b479cbc2150f28168a1b95fd4e80aaa (diff) | |
download | gdb-53cb0362bf2181b1fe1611954529c3bb0649d0af.zip gdb-53cb0362bf2181b1fe1611954529c3bb0649d0af.tar.gz gdb-53cb0362bf2181b1fe1611954529c3bb0649d0af.tar.bz2 |
* config/tc-mn10300.h (tc_fix_adjustable): Define.
* config/tc-mn10300.c (mn10300_fix_adjustable): Don't adjust debug
or non-merged symbols.
-rw-r--r-- | gas/ChangeLog | 6 | ||||
-rw-r--r-- | gas/config/tc-mn10300.c | 9 | ||||
-rw-r--r-- | gas/config/tc-mn10300.h | 4 |
3 files changed, 17 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index a3c5a08..3f4b71f 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -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 diff --git a/gas/config/tc-mn10300.c b/gas/config/tc-mn10300.c index 36e6a05..ea5b533 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; } diff --git a/gas/config/tc-mn10300.h b/gas/config/tc-mn10300.h index 1b88cf2..9e37ea6 100644 --- a/gas/config/tc-mn10300.h +++ b/gas/config/tc-mn10300.h @@ -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. */ |