aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-sh.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2006-07-12 09:02:00 +0000
committerNick Clifton <nickc@redhat.com>2006-07-12 09:02:00 +0000
commit01eaea5ad27ebd470a27ae2f3c9ffd50956d4caf (patch)
tree615f18d78f0c5a4369ba68af08e2e714dc7568d7 /gas/config/tc-sh.c
parent743a4945a6a302c986ee2f2b6d113e33b968a2f8 (diff)
downloadgdb-01eaea5ad27ebd470a27ae2f3c9ffd50956d4caf.zip
gdb-01eaea5ad27ebd470a27ae2f3c9ffd50956d4caf.tar.gz
gdb-01eaea5ad27ebd470a27ae2f3c9ffd50956d4caf.tar.bz2
* config/tc-sh.c (md_apply_fix): Do not allow the generic code in
fixup_segment() to repeat a range check on a value that have already been checked here. * gas/sh/basic.exp: Run "too_large" dump test. * gas/sh/too_large.s: New test file. Check that .byte directives do not generate a bogus overflow message. * gas/sh/too_large.s: New test control file.
Diffstat (limited to 'gas/config/tc-sh.c')
-rw-r--r--gas/config/tc-sh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gas/config/tc-sh.c b/gas/config/tc-sh.c
index 0abbe92..9d651de 100644
--- a/gas/config/tc-sh.c
+++ b/gas/config/tc-sh.c
@@ -4080,6 +4080,11 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
}
if (max != 0 && (val < min || val > max))
as_bad_where (fixP->fx_file, fixP->fx_line, _("offset out of range"));
+ else if (max != 0)
+ /* Stop the generic code from trying to overlow check the value as well.
+ It may not have the correct value anyway, as we do not store val back
+ into *valP. */
+ fixP->fx_no_overflow = 1;
if (fixP->fx_addsy == NULL && fixP->fx_pcrel == 0)
fixP->fx_done = 1;