diff options
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 3b43ecd..f9a6e26 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ 2012-05-09 H.J. Lu <hongjiu.lu@intel.com> + * config/tc-i386.c (tc_gen_reloc): Use fits_in_signed_long. + +2012-05-09 H.J. Lu <hongjiu.lu@intel.com> + * config/tc-i386.c (tc_gen_reloc): Check x32 addend overflow for BFD_RELOC_64. 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"), |