diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2000-11-28 23:33:45 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2000-11-28 23:33:45 +0000 |
commit | 99b222b4795bd3905fbe2a449c1d960c8d64fe32 (patch) | |
tree | 5aa9f7746529db82b2c06a1300a41e91242409ce | |
parent | 08c404a59c92d0defb5a14cd75ef50e8281360ad (diff) | |
download | gdb-99b222b4795bd3905fbe2a449c1d960c8d64fe32.zip gdb-99b222b4795bd3905fbe2a449c1d960c8d64fe32.tar.gz gdb-99b222b4795bd3905fbe2a449c1d960c8d64fe32.tar.bz2 |
* config/tc-sh.c (md_convert_frag) <undefined symbol, conditional
jump>: Use as_bad_where instead of as_bad. Tweak error message
accordingly. Stabilize frag by updating fix part and resetting
variant part.
<undefined symbol, unconditional jump>: Ditto.
-rw-r--r-- | gas/ChangeLog | 8 | ||||
-rw-r--r-- | gas/config/tc-sh.c | 39 |
2 files changed, 30 insertions, 17 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index c8c9051..3ad341a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,11 @@ +2000-11-28 Hans-Peter Nilsson <hp@bitrange.com> + + * config/tc-sh.c (md_convert_frag) <undefined symbol, conditional + jump>: Use as_bad_where instead of as_bad. Tweak error message + accordingly. Stabilize frag by updating fix part and resetting + variant part. + <undefined symbol, unconditional jump>: Ditto. + 2000-11-28 Kazu Hirata <kazu@hxi.com> * config/obj-aout.h: Fix formatting. diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c index cdf249e..306d200 100644 --- a/gas/config/tc-sh.c +++ b/gas/config/tc-sh.c @@ -2391,17 +2391,19 @@ md_convert_frag (headers, seg, fragP) case C (UNCOND_JUMP, UNCOND32): case C (UNCOND_JUMP, UNDEF_WORD_DISP): if (fragP->fr_symbol == NULL) - as_bad (_("at 0x%lx, displacement overflows 12-bit field"), - (unsigned long) fragP->fr_address); + as_bad_where (fragP->fr_file, fragP->fr_line, + _("displacement overflows 12-bit field")); else if (S_IS_DEFINED (fragP->fr_symbol)) - as_bad (_("at 0x%lx, displacement to defined symbol %s overflows 12-bit field"), - (unsigned long) fragP->fr_address, - S_GET_NAME (fragP->fr_symbol)); + as_bad_where (fragP->fr_file, fragP->fr_line, + _("displacement to defined symbol %s overflows 12-bit field"), + S_GET_NAME (fragP->fr_symbol)); else - as_bad (_("at 0x%lx, displacement to undefined symbol %s overflows 12-bit field"), - (unsigned long) fragP->fr_address, - S_GET_NAME (fragP->fr_symbol)); - + as_bad_where (fragP->fr_file, fragP->fr_line, + _("displacement to undefined symbol %s overflows 12-bit field"), + S_GET_NAME (fragP->fr_symbol)); + /* Stabilize this frag, so we don't trip an assert. */ + fragP->fr_fix += fragP->fr_var; + fragP->fr_var = 0; break; case C (COND_JUMP, COND12): @@ -2474,16 +2476,19 @@ md_convert_frag (headers, seg, fragP) case C (COND_JUMP, UNDEF_WORD_DISP): case C (COND_JUMP_DELAY, UNDEF_WORD_DISP): if (fragP->fr_symbol == NULL) - as_bad (_("at 0x%lx, displacement overflows 8-bit field"), - (unsigned long) fragP->fr_address); + as_bad_where (fragP->fr_file, fragP->fr_line, + _("displacement overflows 8-bit field")); else if (S_IS_DEFINED (fragP->fr_symbol)) - as_bad (_("at 0x%lx, displacement to defined symbol %s overflows 8-bit field "), - (unsigned long) fragP->fr_address, - S_GET_NAME (fragP->fr_symbol)); + as_bad_where (fragP->fr_file, fragP->fr_line, + _("displacement to defined symbol %s overflows 8-bit field"), + S_GET_NAME (fragP->fr_symbol)); else - as_bad (_("at 0x%lx, displacement to undefined symbol %s overflows 8-bit field "), - (unsigned long) fragP->fr_address, - S_GET_NAME (fragP->fr_symbol)); + as_bad_where (fragP->fr_file, fragP->fr_line, + _("displacement to undefined symbol %s overflows 8-bit field "), + S_GET_NAME (fragP->fr_symbol)); + /* Stabilize this frag, so we don't trip an assert. */ + fragP->fr_fix += fragP->fr_var; + fragP->fr_var = 0; break; default: |