[PATCH 1/3] binutils/testsuite: Enable strip-13 test for `hppa*-*'

Maciej W. Rozycki macro@mips.com
Wed Apr 4 20:09:00 GMT 2018


Based on relocations defined in include/elf/*.h files we have relocation 
numbers: 143, 159, 214 and 215 currently not used by any of our ELF 
targets.  Use 143 then instead of 241 to enable the `strip-13' test for 
`hppa*-*' targets.  It has a side effect with some targets of verifying 
that unused relocations whose numbers are below the respective R_*_max 
value are handled correctly.

	binutils/
	* testsuite/binutils-all/strip-13.s: Use 143 (0x8f) rather than
	241 (0xf1) for the relocation number and RELA addend.
	* testsuite/binutils-all/strip-13.d: Remove `hppa*-*' from the
	`not-target' list.
---
Hi,

 As previously discussed this causes an issue with x86-64 targets and the 
R_X86_64_converted_reloc_bit bit added with commit 78984959cb38 ("x86-64: 
Add R_X86_64_converted_reloc_bit"), resulting in a test regression.  This
is a bug in the x86-64 target backend, acknowledged by H.J.

 Otherwise no regressions across my usual targets.  OK to apply?

  Maciej
---
 binutils/testsuite/binutils-all/strip-13.d |    3 +--
 binutils/testsuite/binutils-all/strip-13.s |    4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

binutils-strip-13-test-hppa.diff
Index: binutils/binutils/testsuite/binutils-all/strip-13.d
===================================================================
--- binutils.orig/binutils/testsuite/binutils-all/strip-13.d	2018-03-27 17:41:17.000000000 +0100
+++ binutils/binutils/testsuite/binutils-all/strip-13.d	2018-03-27 17:42:20.408237020 +0100
@@ -1,9 +1,8 @@
 #PROG: strip
 #strip: -g
 #error: .* bad value
-#not-target: arm-* d10v-* dlx-* h8300-* hppa*-* ip2k-* rx-* xgate-*
+#not-target: arm-* d10v-* dlx-* h8300-* ip2k-* rx-* xgate-*
 # The D10V, DLX and XGATE targets only support REL relocations but this test uses RELA relocations.
 # The ARM target does support both types, but defaults to REL.
-# The HPPA targets use reloc 241, which is the value this test uses as its "unknown" reloc.
 # The H8300-*, IP2K and RX targets do not complain about unrecognised relocs, unless they are actually used
 #  (which is what should really happen with the other targets...)
Index: binutils/binutils/testsuite/binutils-all/strip-13.s
===================================================================
--- binutils.orig/binutils/testsuite/binutils-all/strip-13.s	2018-03-27 17:41:17.000000000 +0100
+++ binutils/binutils/testsuite/binutils-all/strip-13.s	2018-03-27 17:42:43.103460961 +0100
@@ -4,8 +4,8 @@
 
 	.section .rela.text
 	.dc.a	 0
-	.dc.a    0x000000f1
-	.dc.a	 0x000000f1
+	.dc.a    0x0000008f
+	.dc.a	 0x0000008f
 
 	.dc.a	 0
 	.dc.a    0



More information about the Binutils mailing list