[5/8] x86: Update IFUNC tests for -z separate-code

Message ID 20180215142643.32242-5-hjl.tools@gmail.com
State New
Headers show
Series
  • [1/8] Add -z noseparate-code to ld-elf tests
Related show

Commit Message

H.J. Lu Feb. 15, 2018, 2:26 p.m.
"-z separate-code" generates different PLT addresses.  Update these tests
to accept any PLT addresses.

	* testsuite/ld-ifunc/ifunc-1-local-x86.d: Updated.
	* testsuite/ld-ifunc/ifunc-1-x86.d: Likewise.
	* testsuite/ld-ifunc/ifunc-3a-x86.d: Likewise.
---
 ld/testsuite/ld-ifunc/ifunc-1-local-x86.d | 2 +-
 ld/testsuite/ld-ifunc/ifunc-1-x86.d       | 2 +-
 ld/testsuite/ld-ifunc/ifunc-3a-x86.d      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.14.3

Comments

H.J. Lu Feb. 16, 2018, 5:09 p.m. | #1
On Thu, Feb 15, 2018 at 6:26 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> "-z separate-code" generates different PLT addresses.  Update these tests

> to accept any PLT addresses.

>

>         * testsuite/ld-ifunc/ifunc-1-local-x86.d: Updated.

>         * testsuite/ld-ifunc/ifunc-1-x86.d: Likewise.

>         * testsuite/ld-ifunc/ifunc-3a-x86.d: Likewise.


I am checking this in.


-- 
H.J.
H.J. Lu Feb. 16, 2018, 5:36 p.m. | #2
On Fri, Feb 16, 2018 at 9:09 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Feb 15, 2018 at 6:26 AM, H.J. Lu <hjl.tools@gmail.com> wrote:

>> "-z separate-code" generates different PLT addresses.  Update these tests

>> to accept any PLT addresses.

>>

>>         * testsuite/ld-ifunc/ifunc-1-local-x86.d: Updated.

>>         * testsuite/ld-ifunc/ifunc-1-x86.d: Likewise.

>>         * testsuite/ld-ifunc/ifunc-3a-x86.d: Likewise.

>

> I am checking this in.

>


I checked this in for i386.


-- 
H.J.
From 62e2b91b9ae508a9f875fb7f15c2173dbbfa6f25 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Fri, 16 Feb 2018 09:32:56 -0800
Subject: [PATCH] i386: Update IFUNC tests for PLT address

i386 generates

 161:	e8 ea ff ff ff       	call   150 <*ABS*@plt>

instead of

 1e1:	e8 ea ff ff ff       	callq  1d0 <*ABS*+0x1e0@plt>

	* testsuite/ld-ifunc/ifunc-1-local-x86.d: Update PLT address
	for i386.
	* testsuite/ld-ifunc/ifunc-1-x86.d: Likewise.
	* testsuite/ld-ifunc/ifunc-3a-x86.d: Likewise.
---
 ld/ChangeLog                              | 6 ++++++
 ld/testsuite/ld-ifunc/ifunc-1-local-x86.d | 2 +-
 ld/testsuite/ld-ifunc/ifunc-1-x86.d       | 2 +-
 ld/testsuite/ld-ifunc/ifunc-3a-x86.d      | 2 +-
 4 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index b4ab083652..ecebefca3a 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@
+2018-02-16  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/ld-ifunc/ifunc-1-local-x86.d: Updated for i386.
+	* testsuite/ld-ifunc/ifunc-1-x86.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-3a-x86.d: Likewise.
+
 2018-02-16  H.J. Lu  <hongjiu.lu@intel.com>
 
 	* testsuite/ld-ifunc/ifunc-1-local-x86.d: Updated.
diff --git a/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d b/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d
index 2459add9d7..3c785d9fb3 100644
--- a/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d
+++ b/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d
@@ -4,5 +4,5 @@
 #map: ifunc-1-local-x86.map
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x[0-9a-f]+@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x[0-9a-f]+|)@plt>
 #pass
diff --git a/ld/testsuite/ld-ifunc/ifunc-1-x86.d b/ld/testsuite/ld-ifunc/ifunc-1-x86.d
index 54fcac31a8..4c5bb8d594 100644
--- a/ld/testsuite/ld-ifunc/ifunc-1-x86.d
+++ b/ld/testsuite/ld-ifunc/ifunc-1-x86.d
@@ -4,5 +4,5 @@
 #map: ifunc-1-x86.map
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x[0-9a-f]+@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x[0-9a-f]+|)@plt>
 #pass
diff --git a/ld/testsuite/ld-ifunc/ifunc-3a-x86.d b/ld/testsuite/ld-ifunc/ifunc-3a-x86.d
index 400d07af5b..4954d65808 100644
--- a/ld/testsuite/ld-ifunc/ifunc-3a-x86.d
+++ b/ld/testsuite/ld-ifunc/ifunc-3a-x86.d
@@ -4,5 +4,5 @@
 #target: x86_64-*-* i?86-*-*
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x[0-9a-f]+@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x[0-9a-f]+|)@plt>
 #pass

Patch

diff --git a/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d b/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d
index a6a2c204e5..1a084ee34e 100644
--- a/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d
+++ b/ld/testsuite/ld-ifunc/ifunc-1-local-x86.d
@@ -4,5 +4,5 @@ 
 #map: ifunc-1-local-x86.map
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x160|\+0x170|\+0x1e0|)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x[0-9-a-f]+@plt>
 #pass
diff --git a/ld/testsuite/ld-ifunc/ifunc-1-x86.d b/ld/testsuite/ld-ifunc/ifunc-1-x86.d
index 1471dfea1f..1908c1509f 100644
--- a/ld/testsuite/ld-ifunc/ifunc-1-x86.d
+++ b/ld/testsuite/ld-ifunc/ifunc-1-x86.d
@@ -4,5 +4,5 @@ 
 #map: ifunc-1-x86.map
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x170|\+0x190|\+0x210|)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x[0-9-a-f]+@plt>
 #pass
diff --git a/ld/testsuite/ld-ifunc/ifunc-3a-x86.d b/ld/testsuite/ld-ifunc/ifunc-3a-x86.d
index 3c2a9598c7..c79305aebb 100644
--- a/ld/testsuite/ld-ifunc/ifunc-3a-x86.d
+++ b/ld/testsuite/ld-ifunc/ifunc-3a-x86.d
@@ -4,5 +4,5 @@ 
 #target: x86_64-*-* i?86-*-*
 
 #...
-[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*(\+0x190|\+0x1a0|\+0x1b0|\+0x220|)@plt>
+[ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x[0-9-a-f]+@plt>
 #pass