aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-10 20:46:34 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-05-10 20:46:34 +0000
commit6f2c9068edbe878242f511eb13f03f1a6945f96c (patch)
tree869d00e1dab70bb53720caacba9a8d1b69b3bb70 /gas/config
parent95554aad6c78f459750b8edda9e1832063083132 (diff)
downloadgdb-6f2c9068edbe878242f511eb13f03f1a6945f96c.zip
gdb-6f2c9068edbe878242f511eb13f03f1a6945f96c.tar.gz
gdb-6f2c9068edbe878242f511eb13f03f1a6945f96c.tar.bz2
Display signed hex number in x32 addend overflow check
bfd/ * elf64-x86-64.c (elf_x86_64_relocate_section): Display signed hex number in x32 addend overflow check. gas/ * config/tc-i386.c (tc_gen_reloc): Display signed hex number in x32 addend overflow check. ld/testsuite/ * ld-x86-64/ilp32-11.d: Updated.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-i386.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index ab5233d..e3440f0 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -9177,10 +9177,17 @@ tc_gen_reloc (asection *section ATTRIBUTE_UNUSED, fixS *fixp)
/* Check addend overflow. */
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"),
- bfd_get_reloc_code_name (code),
- (long long) fixp->fx_offset);
+ long long 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"),
+ 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"),
+ bfd_get_reloc_code_name (code), addend);
}
break;
case BFD_RELOC_X86_64_DTPOFF64: