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.
This commit is contained in:
H.J. Lu 2012-05-11 15:48:15 +00:00
parent 208a4923ed
commit e04d7088af
8 changed files with 65 additions and 46 deletions

View File

@ -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

View File

@ -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

View File

@ -1,3 +1,12 @@
2012-05-11 H.J. Lu <hongjiu.lu@intel.com>
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.
2012-05-10 H.J. Lu <hongjiu.lu@intel.com>
* ld-x86-64/ilp32-11.d: Updated.

View File

@ -48,9 +48,9 @@ Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 6 entries:
[0-9a-f ]+R_IA64_DTPMOD64LSB +0+ sg1 \+ 0
[0-9a-f ]+R_IA64_DTPREL64LSB +0+ sg1 \+ 0
[0-9a-f ]+R_IA64_TPREL64LSB +0+4 sg2 \+ 0
[0-9a-f ]+R_IA64_DTPMOD64LSB +0+
[0-9a-f ]+R_IA64_TPREL64LSB +0+44
[0-9a-f ]+R_IA64_TPREL64LSB +0+24
[0-9a-f ]+R_IA64_DTPMOD64LSB +0
[0-9a-f ]+R_IA64_TPREL64LSB +44
[0-9a-f ]+R_IA64_TPREL64LSB +24
Relocation section '.rela.IA_64.pltoff' at offset 0x[0-9a-f]+ contains 1 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend

View File

@ -71,22 +71,22 @@ Dynamic section at offset 0x[0-9a-f]+ contains 16 entries:
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
0+10010638 +[0-9a-f]+ R_X86_64_TPOFF64 +0+24
0+10010640 +[0-9a-f]+ R_X86_64_TPOFF64 +0+30
0+10010648 +[0-9a-f]+ R_X86_64_TPOFF64 +0+64
0+10010658 +[0-9a-f]+ R_X86_64_TPOFF64 +0+50
0+10010660 +[0-9a-f]+ R_X86_64_TPOFF64 +0+70
0+10010670 +[0-9a-f]+ R_X86_64_TPOFF64 +0+44
0+10010638 +[0-9a-f]+ R_X86_64_TPOFF64 +24
0+10010640 +[0-9a-f]+ R_X86_64_TPOFF64 +30
0+10010648 +[0-9a-f]+ R_X86_64_TPOFF64 +64
0+10010658 +[0-9a-f]+ R_X86_64_TPOFF64 +50
0+10010660 +[0-9a-f]+ R_X86_64_TPOFF64 +70
0+10010670 +[0-9a-f]+ R_X86_64_TPOFF64 +44
0+10010650 +[0-9a-f]+ R_X86_64_TPOFF64 +0+10 sg5 \+ 0
0+10010668 +[0-9a-f]+ R_X86_64_TPOFF64 +0+4 sg2 \+ 0
Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 5 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
0+100106c8 +[0-9a-f]+ R_X86_64_TLSDESC +0+ sg1 \+ 0
0+10010698 +[0-9a-f]+ R_X86_64_TLSDESC +0+20
0+100106d8 +[0-9a-f]+ R_X86_64_TLSDESC +0+40
0+100106a8 +[0-9a-f]+ R_X86_64_TLSDESC +0+60
0+100106b8 +[0-9a-f]+ R_X86_64_TLSDESC +0+
0+10010698 +[0-9a-f]+ R_X86_64_TLSDESC +20
0+100106d8 +[0-9a-f]+ R_X86_64_TLSDESC +40
0+100106a8 +[0-9a-f]+ R_X86_64_TLSDESC +60
0+100106b8 +[0-9a-f]+ R_X86_64_TLSDESC +0
Symbol table '\.dynsym' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name

View File

@ -69,22 +69,22 @@ Dynamic section at offset 0x[0-9a-f]+ contains 16 entries:
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 8 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
0+201308 +[0-9a-f]+ R_X86_64_TPOFF64 +0+24
0+201310 +[0-9a-f]+ R_X86_64_TPOFF64 +0+30
0+201318 +[0-9a-f]+ R_X86_64_TPOFF64 +0+64
0+201328 +[0-9a-f]+ R_X86_64_TPOFF64 +0+50
0+201330 +[0-9a-f]+ R_X86_64_TPOFF64 +0+70
0+201340 +[0-9a-f]+ R_X86_64_TPOFF64 +0+44
0+201308 +[0-9a-f]+ R_X86_64_TPOFF64 +24
0+201310 +[0-9a-f]+ R_X86_64_TPOFF64 +30
0+201318 +[0-9a-f]+ R_X86_64_TPOFF64 +64
0+201328 +[0-9a-f]+ R_X86_64_TPOFF64 +50
0+201330 +[0-9a-f]+ R_X86_64_TPOFF64 +70
0+201340 +[0-9a-f]+ R_X86_64_TPOFF64 +44
0+201320 +[0-9a-f]+ R_X86_64_TPOFF64 +0+10 sg5 \+ 0
0+201338 +[0-9a-f]+ R_X86_64_TPOFF64 +0+4 sg2 \+ 0
Relocation section '.rela.plt' at offset 0x[0-9a-f]+ contains 5 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
0+201398 +[0-9a-f]+ R_X86_64_TLSDESC +0+ sg1 \+ 0
0+201368 +[0-9a-f]+ R_X86_64_TLSDESC +0+20
0+2013a8 +[0-9a-f]+ R_X86_64_TLSDESC +0+40
0+201378 +[0-9a-f]+ R_X86_64_TLSDESC +0+60
0+201388 +[0-9a-f]+ R_X86_64_TLSDESC +0+
0+201368 +[0-9a-f]+ R_X86_64_TLSDESC +20
0+2013a8 +[0-9a-f]+ R_X86_64_TLSDESC +40
0+201378 +[0-9a-f]+ R_X86_64_TLSDESC +60
0+201388 +[0-9a-f]+ R_X86_64_TLSDESC +0
Symbol table '\.dynsym' contains [0-9]+ entries:
+Num: +Value +Size +Type +Bind +Vis +Ndx +Name

View File

@ -52,16 +52,16 @@ Program Headers:
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
[0-9a-f ]+R_X86_64_DTPMOD64 +0+
[0-9a-f ]+R_X86_64_TPOFF64 +0+24
[0-9a-f ]+R_X86_64_TPOFF64 +0+30
[0-9a-f ]+R_X86_64_DTPMOD64 +0+
[0-9a-f ]+R_X86_64_DTPMOD64 +0+
[0-9a-f ]+R_X86_64_TPOFF64 +0+64
[0-9a-f ]+R_X86_64_TPOFF64 +0+50
[0-9a-f ]+R_X86_64_TPOFF64 +0+70
[0-9a-f ]+R_X86_64_DTPMOD64 +0+
[0-9a-f ]+R_X86_64_TPOFF64 +0+44
[0-9a-f ]+R_X86_64_DTPMOD64 +0
[0-9a-f ]+R_X86_64_TPOFF64 +24
[0-9a-f ]+R_X86_64_TPOFF64 +30
[0-9a-f ]+R_X86_64_DTPMOD64 +0
[0-9a-f ]+R_X86_64_DTPMOD64 +0
[0-9a-f ]+R_X86_64_TPOFF64 +64
[0-9a-f ]+R_X86_64_TPOFF64 +50
[0-9a-f ]+R_X86_64_TPOFF64 +70
[0-9a-f ]+R_X86_64_DTPMOD64 +0
[0-9a-f ]+R_X86_64_TPOFF64 +44
[0-9a-f ]+R_X86_64_TPOFF64 +0+10 sg5 \+ 0
[0-9a-f ]+R_X86_64_DTPMOD64 +0+ sg1 \+ 0
[0-9a-f ]+R_X86_64_DTPOFF64 +0+ sg1 \+ 0

View File

@ -50,16 +50,16 @@ Program Headers:
Relocation section '.rela.dyn' at offset 0x[0-9a-f]+ contains 14 entries:
+Offset +Info +Type +Symbol's Value +Symbol's Name \+ Addend
[0-9a-f ]+R_X86_64_DTPMOD64 +0+
[0-9a-f ]+R_X86_64_TPOFF64 +0+24
[0-9a-f ]+R_X86_64_TPOFF64 +0+30
[0-9a-f ]+R_X86_64_DTPMOD64 +0+
[0-9a-f ]+R_X86_64_DTPMOD64 +0+
[0-9a-f ]+R_X86_64_TPOFF64 +0+64
[0-9a-f ]+R_X86_64_TPOFF64 +0+50
[0-9a-f ]+R_X86_64_TPOFF64 +0+70
[0-9a-f ]+R_X86_64_DTPMOD64 +0+
[0-9a-f ]+R_X86_64_TPOFF64 +0+44
[0-9a-f ]+R_X86_64_DTPMOD64 +0
[0-9a-f ]+R_X86_64_TPOFF64 +24
[0-9a-f ]+R_X86_64_TPOFF64 +30
[0-9a-f ]+R_X86_64_DTPMOD64 +0
[0-9a-f ]+R_X86_64_DTPMOD64 +0
[0-9a-f ]+R_X86_64_TPOFF64 +64
[0-9a-f ]+R_X86_64_TPOFF64 +50
[0-9a-f ]+R_X86_64_TPOFF64 +70
[0-9a-f ]+R_X86_64_DTPMOD64 +0
[0-9a-f ]+R_X86_64_TPOFF64 +44
[0-9a-f ]+R_X86_64_TPOFF64 +0+10 sg5 \+ 0
[0-9a-f ]+R_X86_64_DTPMOD64 +0+ sg1 \+ 0
[0-9a-f ]+R_X86_64_DTPOFF64 +0+ sg1 \+ 0