aboutsummaryrefslogtreecommitdiff
path: root/gas
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
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')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-i386.c15
2 files changed, 16 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index f9a6e26..dfe45d2 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
2012-05-09 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (tc_gen_reloc): Use fits_in_signed_long.
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: