diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-05-11 00:50:43 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-05-11 00:50:43 +0000 |
commit | 268a8d3ac407c5ce6bd6fe27736a1b9265e84f25 (patch) | |
tree | 43a3da45e77d1c335562ffcd1b48dd52a2f8026e /gas | |
parent | 74b1e045f3883b1b07ca5f8f83e7a97948891973 (diff) | |
download | binutils-268a8d3ac407c5ce6bd6fe27736a1b9265e84f25.zip binutils-268a8d3ac407c5ce6bd6fe27736a1b9265e84f25.tar.gz binutils-268a8d3ac407c5ce6bd6fe27736a1b9265e84f25.tar.bz2 |
Use int and bfd_signed_vma in x32 addend overflow check
bfd/
* elf64-x86-64.c (elf_x86_64_relocate_section): Use int in x32
addend overflow check.
gas/
* config/tc-i386.c (tc_gen_reloc): Use bfd_signed_vma in x32
addend overflow check.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-i386.c | 8 |
2 files changed, 10 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index dfe45d2..c9048e3 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,10 @@ 2012-05-10 H.J. Lu <hongjiu.lu@intel.com> + * config/tc-i386.c (tc_gen_reloc): Use bfd_signed_vma in x32 + addend overflow check. + +2012-05-10 H.J. Lu <hongjiu.lu@intel.com> + * config/tc-i386.c (tc_gen_reloc): Display signed hex number in x32 addend overflow check. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index e3440f0..e33fb6c 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -9177,16 +9177,18 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp) /* Check addend overflow. */ if (!fits_in_signed_long (fixp->fx_offset)) { - long long addend = fixp->fx_offset; + bfd_signed_vma addend = fixp->fx_offset; if (addend < 0) as_bad_where (fixp->fx_file, fixp->fx_line, _("cannot represent relocation %s with " - "addend -0x%llx in x32 mode"), + "addend -0x%" BFD_VMA_FMT "x in x32 " + "mode"), bfd_get_reloc_code_name (code), -addend); else as_bad_where (fixp->fx_file, fixp->fx_line, _("cannot represent relocation %s with " - "addend 0x%llx in x32 mode"), + "addend 0x%" BFD_VMA_FMT "x in x32 " + "mode"), bfd_get_reloc_code_name (code), addend); } break; |