aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2012-05-11 15:48:15 +0000
committerH.J. Lu <hjl.tools@gmail.com>2012-05-11 15:48:15 +0000
commite04d7088afe0be6ef89900a994bd48bf35d17e77 (patch)
tree35c85e2294cb877921ecbf5a7dbbec706690a435 /binutils
parent208a4923edd990535a9bbf73bf39a8609771aec3 (diff)
downloadgdb-e04d7088afe0be6ef89900a994bd48bf35d17e77.zip
gdb-e04d7088afe0be6ef89900a994bd48bf35d17e77.tar.gz
gdb-e04d7088afe0be6ef89900a994bd48bf35d17e77.tar.bz2
Always display addend as signed hex number
binutils/ PR binutils/14088 * readelf.c (dump_relocations): Always display addend as signed hex number. ld/testsuite/ PR binutils/14088 * ld-ia64/tlspic.rd: Updated. * ld-x86-64/tlsdesc-nacl.rd: Likewise. * ld-x86-64/tlsdesc.rd: Likewise. * ld-x86-64/tlspic-nacl.rd: Likewise. * ld-x86-64/tlspic.rd: Likewise.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/readelf.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index f620fe0..3a5c740 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/14088
+ * readelf.c (dump_relocations): Always display addend as
+ signed hex number.
+
2012-05-11 Daniel Richard G. <skunk@iskunk.org>
PR binutils/14028
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 937cac1..84a13a7 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -1387,9 +1387,13 @@ dump_relocations (FILE * file,
}
else if (is_rela)
{
- printf ("%*c", is_32bit_elf ?
- (do_wide ? 34 : 28) : (do_wide ? 26 : 20), ' ');
- print_vma (rels[i].r_addend, LONG_HEX);
+ bfd_signed_vma off = rels[i].r_addend;
+
+ printf ("%*c", is_32bit_elf ? 12 : 20, ' ');
+ if (off < 0)
+ printf ("-%" BFD_VMA_FMT "x", - off);
+ else
+ printf ("%" BFD_VMA_FMT "x", off);
}
if (elf_header.e_machine == EM_SPARCV9