This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] MIPS/LD/testsuite: Correct relocation addends in VxWorks tests


Fix commit 171191bac50e ("Add support for STT_IFUNC"), 
<https://sourceware.org/ml/binutils/2008-12/msg00052.html>, commit 
e04d7088afe0 ("PR ld/14088: Always display addend as signed hex 
number"), <https://sourceware.org/ml/binutils/2012-05/msg00123.html> and 
commit 343dbc36ffae ("Print addend as signed in objdump"), 
<https://sourceware.org/ml/binutils/2012-05/msg00163.html> regressions:

FAIL: VxWorks executable test 1 (dynamic)
FAIL: ld-mips-elf/vxworks-forced-local-1

seen with `mips-vxworks' and `mipsel-vxworks' targets and adjust dump 
patterns according to changes made to the presentation of relocation 
addends in `readelf -r' and `objdump -r' output.

	ld/
	* testsuite/ld-mips-elf/vxworks-forced-local-1.d: Correct the 
	presentation of relocation addends.
	* testsuite/ld-mips-elf/vxworks1-lib.rd: Likewise.
	* testsuite/ld-mips-elf/vxworks1.dd: Likewise.
	* testsuite/ld-mips-elf/vxworks1.rd: Likewise.
---
 Despite the update to `vxworks1-lib.rd' the:

FAIL: VxWorks shared library test 1

regression remains, due to a pair of extraneous R_MIPS_NONE `.rela.dyn' 
relocations the existence of which still has to be investigated.

 Committed to master and backported to 2.28.

  Maciej

binutils-mips-ld-vxworks-test-reloc.diff
Index: binutils/ld/testsuite/ld-mips-elf/vxworks-forced-local-1.d
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/vxworks-forced-local-1.d	2016-09-29 05:16:44.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/vxworks-forced-local-1.d	2017-01-30 04:06:27.300470604 +0000
@@ -5,8 +5,8 @@
 
 Relocation section '\.rela\.dyn' .*
 .*
-0008140c  00000002 R_MIPS_32 *00080810
-00081410  00000002 R_MIPS_32 *00080814
-00081414  00000002 R_MIPS_32 *00080818
+0008140c  00000002 R_MIPS_32 *80810
+00081410  00000002 R_MIPS_32 *80814
+00081414  00000002 R_MIPS_32 *80818
 00081418  00000302 R_MIPS_32 *00000000 *bar \+ 0
 #pass
Index: binutils/ld/testsuite/ld-mips-elf/vxworks1-lib.rd
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/vxworks1-lib.rd	2016-09-29 05:16:44.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/vxworks1-lib.rd	2017-01-30 04:08:58.054122265 +0000
@@ -4,9 +4,9 @@
 00080c0c  .*05 R_MIPS_HI16       00000000   __GOTT_BASE__ \+ 0
 00080c10  .*06 R_MIPS_LO16       00000000   __GOTT_BASE__ \+ 0
 00080c14  .*01 R_MIPS_16         00000000   __GOTT_INDEX__ \+ 0
-0008141c  00000002 R_MIPS_32                                    00080c5c
-00081800  00000002 R_MIPS_32                                    00080c5c
-00081804  00000002 R_MIPS_32                                    00081800
+0008141c  00000002 R_MIPS_32                    80c5c
+00081800  00000002 R_MIPS_32                    80c5c
+00081804  00000002 R_MIPS_32                    81800
 00081808  .*02 R_MIPS_32         00081808   dglobal \+ 0
 0008180c  .*02 R_MIPS_32         00000000   dexternal \+ 0
 00081420  .*02 R_MIPS_32         00081c00   x \+ 0
Index: binutils/ld/testsuite/ld-mips-elf/vxworks1.dd
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/vxworks1.dd	2016-09-29 05:16:44.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/vxworks1.dd	2017-01-30 04:32:53.840365761 +0000
@@ -15,9 +15,9 @@
    80818:	1000fff9 	b	80800 <_PROCEDURE_LINKAGE_TABLE_>
    8081c:	24180000 	li	t8,0
    80820:	3c190008 	lui	t9,0x8
-			80820: R_MIPS_HI16	_GLOBAL_OFFSET_TABLE_\+0xfffffff0
+			80820: R_MIPS_HI16	_GLOBAL_OFFSET_TABLE_-0x10
    80824:	27391400 	addiu	t9,t9,5120
-			80824: R_MIPS_LO16	_GLOBAL_OFFSET_TABLE_\+0xfffffff0
+			80824: R_MIPS_LO16	_GLOBAL_OFFSET_TABLE_-0x10
    80828:	8f390000 	lw	t9,0\(t9\)
    8082c:	00000000 	nop
    80830:	03200008 	jr	t9
@@ -25,9 +25,9 @@
    80838:	1000fff1 	b	80800 <_PROCEDURE_LINKAGE_TABLE_>
    8083c:	24180001 	li	t8,1
    80840:	3c190008 	lui	t9,0x8
-			80840: R_MIPS_HI16	_GLOBAL_OFFSET_TABLE_\+0xfffffff4
+			80840: R_MIPS_HI16	_GLOBAL_OFFSET_TABLE_-0xc
    80844:	27391404 	addiu	t9,t9,5124
-			80844: R_MIPS_LO16	_GLOBAL_OFFSET_TABLE_\+0xfffffff4
+			80844: R_MIPS_LO16	_GLOBAL_OFFSET_TABLE_-0xc
    80848:	8f390000 	lw	t9,0\(t9\)
    8084c:	00000000 	nop
    80850:	03200008 	jr	t9
Index: binutils/ld/testsuite/ld-mips-elf/vxworks1.rd
===================================================================
--- binutils.orig/ld/testsuite/ld-mips-elf/vxworks1.rd	2016-09-29 05:16:44.000000000 +0100
+++ binutils/ld/testsuite/ld-mips-elf/vxworks1.rd	2017-01-30 04:29:18.115683811 +0000
@@ -25,8 +25,8 @@
 00080800  .*05 R_MIPS_HI16       00081410   _GLOBAL_OFFSET_TABLE_ \+ 0
 00080804  .*06 R_MIPS_LO16       00081410   _GLOBAL_OFFSET_TABLE_ \+ 0
 00081400  .*02 R_MIPS_32         00080800   _PROCEDURE_LINKAGE_TAB.* \+ 18
-00080820  .*05 R_MIPS_HI16       00081410   _GLOBAL_OFFSET_TABLE_ \+ fffffff0
-00080824  .*06 R_MIPS_LO16       00081410   _GLOBAL_OFFSET_TABLE_ \+ fffffff0
+00080820  .*05 R_MIPS_HI16       00081410   _GLOBAL_OFFSET_TABLE_ - 10
+00080824  .*06 R_MIPS_LO16       00081410   _GLOBAL_OFFSET_TABLE_ - 10
 00081404  .*02 R_MIPS_32         00080800   _PROCEDURE_LINKAGE_TAB.* \+ 38
-00080840  .*05 R_MIPS_HI16       00081410   _GLOBAL_OFFSET_TABLE_ \+ fffffff4
-00080844  .*06 R_MIPS_LO16       00081410   _GLOBAL_OFFSET_TABLE_ \+ fffffff4
+00080840  .*05 R_MIPS_HI16       00081410   _GLOBAL_OFFSET_TABLE_ - c
+00080844  .*06 R_MIPS_LO16       00081410   _GLOBAL_OFFSET_TABLE_ - c


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]