diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-05-11 15:48:15 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-05-11 15:48:15 +0000 |
commit | e04d7088afe0be6ef89900a994bd48bf35d17e77 (patch) | |
tree | 35c85e2294cb877921ecbf5a7dbbec706690a435 /binutils/readelf.c | |
parent | 208a4923edd990535a9bbf73bf39a8609771aec3 (diff) | |
download | gdb-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/readelf.c')
-rw-r--r-- | binutils/readelf.c | 10 |
1 files changed, 7 insertions, 3 deletions
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 |