summaryrefslogtreecommitdiff
path: root/gas/config/tc-i386.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-11 00:50:42 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-05-11 00:50:42 +0000
commitfb604097d9ef816aebc501031cbff24a80afacb5 (patch)
treed2a3d07579fe7e8fbb8e5870a5e49c4e30d6310a /gas/config/tc-i386.c
parent41eac08e8cdad7297284a653f900c2fedaee622f (diff)
downloadbinutils-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.c8
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;