diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-05-10 03:48:33 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-05-10 03:48:33 +0000 |
commit | 83acd3e879271522628c834171c3e52c041c90cc (patch) | |
tree | 225178c1da93265339e54cf88e368d825af5a2ce /gas/config/tc-i386.c | |
parent | 8cf0d2dd210b73dff4a2d63d60c49e42b86565a7 (diff) | |
download | gdb-83acd3e879271522628c834171c3e52c041c90cc.zip gdb-83acd3e879271522628c834171c3e52c041c90cc.tar.gz gdb-83acd3e879271522628c834171c3e52c041c90cc.tar.bz2 |
Use fits_in_signed_long to check x32 addend overflow
* config/tc-i386.c (tc_gen_reloc): Use fits_in_signed_long.
Diffstat (limited to 'gas/config/tc-i386.c')
-rw-r--r-- | gas/config/tc-i386.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 06f9764..ab5233d 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -9175,8 +9175,7 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp) { case BFD_RELOC_64: /* Check addend overflow. */ - if ((long long) fixp->fx_offset > 0x7fffffffLL - || (long long) fixp->fx_offset < -0x80000000LL) + if (!fits_in_signed_long (fixp->fx_offset)) { as_bad_where (fixp->fx_file, fixp->fx_line, _("cannot represent relocation %s with addend %lld in x32 mode"), |