diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-05-11 00:50:42 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-05-11 00:50:42 +0000 |
commit | fb604097d9ef816aebc501031cbff24a80afacb5 (patch) | |
tree | d2a3d07579fe7e8fbb8e5870a5e49c4e30d6310a /gas/config/tc-i386.c | |
parent | 41eac08e8cdad7297284a653f900c2fedaee622f (diff) | |
download | binutils-redhat-fb604097d9ef816aebc501031cbff24a80afacb5.tar.gz |
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/config/tc-i386.c')
-rw-r--r-- | gas/config/tc-i386.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index e3440f097c..e33fb6ca33 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; |