diff options
author | Alan Modra <amodra@gmail.com> | 2015-07-22 10:26:29 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2015-07-23 00:45:54 +0930 |
commit | 7360e63f80782cf34a195eb1c6149760c3da7f14 (patch) | |
tree | d02f4db632cff124c33390e1969038de891163cf /binutils/readelf.c | |
parent | 511b1657d2b251e529a7a0634325bb7d8f3af80d (diff) | |
download | gdb-7360e63f80782cf34a195eb1c6149760c3da7f14.zip gdb-7360e63f80782cf34a195eb1c6149760c3da7f14.tar.gz gdb-7360e63f80782cf34a195eb1c6149760c3da7f14.tar.bz2 |
readelf display of 0x800...000 addend
* readelf.c (dump_relocations): Show MIN_INT addends as negative.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index c313db4..a9b9f2d 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -1608,12 +1608,9 @@ dump_relocations (FILE * file, if (is_rela) { - bfd_signed_vma off = rels[i].r_addend; + bfd_vma off = rels[i].r_addend; - /* PR 17531: file: 2e63226f. */ - if (off == ((bfd_signed_vma) 1) << ((sizeof (bfd_signed_vma) * 8) - 1)) - printf (" + %" BFD_VMA_FMT "x", off); - else if (off < 0) + if ((bfd_signed_vma) off < 0) printf (" - %" BFD_VMA_FMT "x", - off); else printf (" + %" BFD_VMA_FMT "x", off); @@ -1622,13 +1619,10 @@ dump_relocations (FILE * file, } else if (is_rela) { - bfd_signed_vma off = rels[i].r_addend; + bfd_vma off = rels[i].r_addend; printf ("%*c", is_32bit_elf ? 12 : 20, ' '); - /* PR 17531: file: 2e63226f. */ - if (off == ((bfd_signed_vma) 1) << ((sizeof (bfd_signed_vma) * 8) - 1)) - printf ("%" BFD_VMA_FMT "x", off); - else if (off < 0) + if ((bfd_signed_vma) off < 0) printf ("-%" BFD_VMA_FMT "x", - off); else printf ("%" BFD_VMA_FMT "x", off); |