From 03fce1c78c01a9b0e30e91be60e7af717a10bb2c Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 28 May 2018 08:05:09 -0700
Subject: [PATCH] ld: Skip some x86 IFUNC tests for NaCl targets

Since NaCl linker may not support "-m elf_i386" nor "-m elf_x86_64", skip
x86 IFUNC tests for NaCl targets where "-m elf_i386" or "-m elf_x86_64"
are passed to linker.

	* testsuite/ld-ifunc/ifunc-10-i386.d: Skip NaCl targets.
	* testsuite/ld-ifunc/ifunc-10-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-11-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-11-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-12-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-12-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-13-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-13-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14c-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14c-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14d-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14d-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14e-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14e-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14f-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-14f-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-15-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-15-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-16-i386-now.d: Likewise.
	* testsuite/ld-ifunc/ifunc-16-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-16-x86-64-now.d: Likewise.
	* testsuite/ld-ifunc/ifunc-16-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-17a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-17a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-17b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-17b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-18a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-18a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-18b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-18b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-19a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-19a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-19b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-19b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-local-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-local-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-2-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-20-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-20-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-21-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-21-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-22-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-22-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5a-local-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5a-local-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5b-local-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5b-local-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5r-local-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-5r-local-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-6a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-6a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-6b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-6b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-7a-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-7a-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-7b-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-7b-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-8-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-8-x86-64.d: Likewise.
	* testsuite/ld-ifunc/ifunc-9-i386.d: Likewise.
	* testsuite/ld-ifunc/ifunc-9-x86-64.d: Likewise.
	* testsuite/ld-ifunc/pr17154-i386.d: Likewise.
	* testsuite/ld-ifunc/pr17154-x86-64-now.d: Likewise.
	* testsuite/ld-ifunc/pr17154-x86-64.d: Likewise.
---
 ld/ChangeLog                                  | 76 +++++++++++++++++++
 ld/testsuite/ld-ifunc/ifunc-10-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-10-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-11-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-11-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-12-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-12-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-13-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-13-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-14a-i386.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-14a-x86-64.d      |  1 +
 ld/testsuite/ld-ifunc/ifunc-14b-i386.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-14b-x86-64.d      |  1 +
 ld/testsuite/ld-ifunc/ifunc-14c-i386.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-14c-x86-64.d      |  1 +
 ld/testsuite/ld-ifunc/ifunc-14d-i386.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-14d-x86-64.d      |  1 +
 ld/testsuite/ld-ifunc/ifunc-14e-i386.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-14e-x86-64.d      |  1 +
 ld/testsuite/ld-ifunc/ifunc-14f-i386.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-14f-x86-64.d      |  1 +
 ld/testsuite/ld-ifunc/ifunc-15-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-15-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-16-i386-now.d     |  1 +
 ld/testsuite/ld-ifunc/ifunc-16-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-16-x86-64-now.d   |  1 +
 ld/testsuite/ld-ifunc/ifunc-16-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-17a-i386.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-17a-x86-64.d      |  1 +
 ld/testsuite/ld-ifunc/ifunc-17b-i386.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-17b-x86-64.d      |  1 +
 ld/testsuite/ld-ifunc/ifunc-18a-i386.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-18a-x86-64.d      |  1 +
 ld/testsuite/ld-ifunc/ifunc-18b-i386.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-18b-x86-64.d      |  1 +
 ld/testsuite/ld-ifunc/ifunc-19a-i386.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-19a-x86-64.d      |  1 +
 ld/testsuite/ld-ifunc/ifunc-19b-i386.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-19b-x86-64.d      |  1 +
 ld/testsuite/ld-ifunc/ifunc-2-i386.d          |  1 +
 ld/testsuite/ld-ifunc/ifunc-2-local-i386.d    |  1 +
 ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d  |  1 +
 ld/testsuite/ld-ifunc/ifunc-2-x86-64.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-20-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-20-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-21-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-21-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-22-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-22-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-5a-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d   |  1 +
 ld/testsuite/ld-ifunc/ifunc-5a-local-x86-64.d |  1 +
 ld/testsuite/ld-ifunc/ifunc-5a-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-5b-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d   |  1 +
 ld/testsuite/ld-ifunc/ifunc-5b-local-x86-64.d |  1 +
 ld/testsuite/ld-ifunc/ifunc-5b-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-5r-local-i386.d   |  1 +
 ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d |  1 +
 ld/testsuite/ld-ifunc/ifunc-6a-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-6a-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-6b-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-6b-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-7a-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-7a-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-7b-i386.d         |  1 +
 ld/testsuite/ld-ifunc/ifunc-7b-x86-64.d       |  1 +
 ld/testsuite/ld-ifunc/ifunc-8-i386.d          |  1 +
 ld/testsuite/ld-ifunc/ifunc-8-x86-64.d        |  1 +
 ld/testsuite/ld-ifunc/ifunc-9-i386.d          |  1 +
 ld/testsuite/ld-ifunc/ifunc-9-x86-64.d        |  1 +
 ld/testsuite/ld-ifunc/pr17154-i386.d          |  1 +
 ld/testsuite/ld-ifunc/pr17154-x86-64-now.d    |  1 +
 ld/testsuite/ld-ifunc/pr17154-x86-64.d        |  1 +
 74 files changed, 149 insertions(+)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index fa5f2224cc5..0d6bf36c0db 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,79 @@
+2018-05-28  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/ld-ifunc/ifunc-10-i386.d: Skip NaCl targets.
+	* testsuite/ld-ifunc/ifunc-10-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-11-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-11-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-12-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-12-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-13-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-13-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-14a-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-14a-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-14b-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-14b-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-14c-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-14c-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-14d-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-14d-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-14e-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-14e-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-14f-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-14f-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-15-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-15-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-16-i386-now.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-16-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-16-x86-64-now.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-16-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-17a-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-17a-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-17b-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-17b-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-18a-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-18a-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-18b-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-18b-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-19a-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-19a-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-19b-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-19b-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-2-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-2-local-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-2-local-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-2-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-20-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-20-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-21-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-21-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-22-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-22-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-5a-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-5a-local-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-5a-local-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-5a-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-5b-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-5b-local-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-5b-local-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-5b-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-5r-local-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-5r-local-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-6a-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-6a-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-6b-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-6b-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-7a-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-7a-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-7b-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-7b-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-8-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-8-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-9-i386.d: Likewise.
+	* testsuite/ld-ifunc/ifunc-9-x86-64.d: Likewise.
+	* testsuite/ld-ifunc/pr17154-i386.d: Likewise.
+	* testsuite/ld-ifunc/pr17154-x86-64-now.d: Likewise.
+	* testsuite/ld-ifunc/pr17154-x86-64.d: Likewise.
+
 2018-05-26  H.J. Lu  <hongjiu.lu@intel.com>
 
 	PR ld/23194
diff --git a/ld/testsuite/ld-ifunc/ifunc-10-i386.d b/ld/testsuite/ld-ifunc/ifunc-10-i386.d
index 5f56b24425a..f769db13de2 100644
--- a/ld/testsuite/ld-ifunc/ifunc-10-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-10-i386.d
@@ -2,5 +2,6 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 There are no relocations in this file.
diff --git a/ld/testsuite/ld-ifunc/ifunc-10-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-10-x86-64.d
index 8ece379efbc..bd83721db0e 100644
--- a/ld/testsuite/ld-ifunc/ifunc-10-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-10-x86-64.d
@@ -2,5 +2,6 @@
 #as: --64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 There are no relocations in this file.
diff --git a/ld/testsuite/ld-ifunc/ifunc-11-i386.d b/ld/testsuite/ld-ifunc/ifunc-11-i386.d
index 5f56b24425a..f769db13de2 100644
--- a/ld/testsuite/ld-ifunc/ifunc-11-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-11-i386.d
@@ -2,5 +2,6 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 There are no relocations in this file.
diff --git a/ld/testsuite/ld-ifunc/ifunc-11-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-11-x86-64.d
index 8ece379efbc..bd83721db0e 100644
--- a/ld/testsuite/ld-ifunc/ifunc-11-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-11-x86-64.d
@@ -2,5 +2,6 @@
 #as: --64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 There are no relocations in this file.
diff --git a/ld/testsuite/ld-ifunc/ifunc-12-i386.d b/ld/testsuite/ld-ifunc/ifunc-12-i386.d
index de1418154e6..fb868aec364 100644
--- a/ld/testsuite/ld-ifunc/ifunc-12-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-12-i386.d
@@ -2,5 +2,6 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 There are no relocations in this file.
diff --git a/ld/testsuite/ld-ifunc/ifunc-12-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-12-x86-64.d
index 40f07c38bb7..dbbc9dfd18b 100644
--- a/ld/testsuite/ld-ifunc/ifunc-12-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-12-x86-64.d
@@ -2,5 +2,6 @@
 #as: --64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 There are no relocations in this file.
diff --git a/ld/testsuite/ld-ifunc/ifunc-13-i386.d b/ld/testsuite/ld-ifunc/ifunc-13-i386.d
index fd35955083f..79a64d9910d 100644
--- a/ld/testsuite/ld-ifunc/ifunc-13-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-13-i386.d
@@ -4,6 +4,7 @@
 #as: --32 -mrelax-relocations=yes
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.ifunc' at offset 0x[0-9a-f]+ contains 1 entry:
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-13-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-13-x86-64.d
index 115194d319b..5987bfe4532 100644
--- a/ld/testsuite/ld-ifunc/ifunc-13-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-13-x86-64.d
@@ -4,6 +4,7 @@
 #as: --64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.ifunc' at offset 0x[0-9a-f]+ contains 1 entry:
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-14a-i386.d b/ld/testsuite/ld-ifunc/ifunc-14a-i386.d
index 0edc9fbbd5e..988f5f3a9a0 100644
--- a/ld/testsuite/ld-ifunc/ifunc-14a-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-14a-i386.d
@@ -4,6 +4,7 @@
 #as: --32
 #readelf: -d --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 #failif
 #...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-14a-x86-64.d
index 2c4ebbb03b9..9f04458e330 100644
--- a/ld/testsuite/ld-ifunc/ifunc-14a-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-14a-x86-64.d
@@ -4,6 +4,7 @@
 #as: --64
 #readelf: -d
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 #failif
 #...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14b-i386.d b/ld/testsuite/ld-ifunc/ifunc-14b-i386.d
index 948237d1caa..42b7ce6d911 100644
--- a/ld/testsuite/ld-ifunc/ifunc-14b-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-14b-i386.d
@@ -4,6 +4,7 @@
 #as: --32
 #readelf: -d --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 #failif
 #...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-14b-x86-64.d
index cc1f5ae6b2a..dc7aa2702ab 100644
--- a/ld/testsuite/ld-ifunc/ifunc-14b-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-14b-x86-64.d
@@ -4,6 +4,7 @@
 #as: --64
 #readelf: -d
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 #failif
 #...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14c-i386.d b/ld/testsuite/ld-ifunc/ifunc-14c-i386.d
index ca360a396d0..137b3e9b026 100644
--- a/ld/testsuite/ld-ifunc/ifunc-14c-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-14c-i386.d
@@ -4,6 +4,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 #failif
 #...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14c-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-14c-x86-64.d
index 76bfa84a2f0..4f0c4b1e62a 100644
--- a/ld/testsuite/ld-ifunc/ifunc-14c-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-14c-x86-64.d
@@ -4,6 +4,7 @@
 #as: --64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 #failif
 #...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14d-i386.d b/ld/testsuite/ld-ifunc/ifunc-14d-i386.d
index 2327278f3bf..094defc9330 100644
--- a/ld/testsuite/ld-ifunc/ifunc-14d-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-14d-i386.d
@@ -4,6 +4,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 #failif
 #...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14d-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-14d-x86-64.d
index 789584bc309..011da6cee76 100644
--- a/ld/testsuite/ld-ifunc/ifunc-14d-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-14d-x86-64.d
@@ -4,6 +4,7 @@
 #as: --64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 #failif
 #...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14e-i386.d b/ld/testsuite/ld-ifunc/ifunc-14e-i386.d
index 53809870cca..eec7ab655dd 100644
--- a/ld/testsuite/ld-ifunc/ifunc-14e-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-14e-i386.d
@@ -5,6 +5,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 #failif
 #...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14e-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-14e-x86-64.d
index 0955c92f138..5a3eec84531 100644
--- a/ld/testsuite/ld-ifunc/ifunc-14e-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-14e-x86-64.d
@@ -5,6 +5,7 @@
 #as: --64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 #failif
 #...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14f-i386.d b/ld/testsuite/ld-ifunc/ifunc-14f-i386.d
index ed3dc539d0f..826ddd34024 100644
--- a/ld/testsuite/ld-ifunc/ifunc-14f-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-14f-i386.d
@@ -5,6 +5,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 #failif
 #...
diff --git a/ld/testsuite/ld-ifunc/ifunc-14f-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-14f-x86-64.d
index 12fb2257a84..b1b053f056d 100644
--- a/ld/testsuite/ld-ifunc/ifunc-14f-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-14f-x86-64.d
@@ -5,6 +5,7 @@
 #as: --64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 #failif
 #...
diff --git a/ld/testsuite/ld-ifunc/ifunc-15-i386.d b/ld/testsuite/ld-ifunc/ifunc-15-i386.d
index 51c87a86712..0c062fd3c65 100644
--- a/ld/testsuite/ld-ifunc/ifunc-15-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-15-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.got' at offset 0x[0-9a-f]+ contains 1 entry:
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-15-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-15-x86-64.d
index e039cef718c..438f176da17 100644
--- a/ld/testsuite/ld-ifunc/ifunc-15-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-15-x86-64.d
@@ -3,6 +3,7 @@
 #as: --64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.got' at offset 0x[0-9a-f]+ contains 1 entry:
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-16-i386-now.d b/ld/testsuite/ld-ifunc/ifunc-16-i386-now.d
index b72f077ff17..ee0e5fdea5e 100644
--- a/ld/testsuite/ld-ifunc/ifunc-16-i386-now.d
+++ b/ld/testsuite/ld-ifunc/ifunc-16-i386-now.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-16-i386.d b/ld/testsuite/ld-ifunc/ifunc-16-i386.d
index 8ae3d0af33e..bc80fa1ec2d 100644
--- a/ld/testsuite/ld-ifunc/ifunc-16-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-16-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-16-x86-64-now.d b/ld/testsuite/ld-ifunc/ifunc-16-x86-64-now.d
index db6c0e285a1..00f24274bcb 100644
--- a/ld/testsuite/ld-ifunc/ifunc-16-x86-64-now.d
+++ b/ld/testsuite/ld-ifunc/ifunc-16-x86-64-now.d
@@ -3,6 +3,7 @@
 #ld: -z now -shared -melf_x86_64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-16-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-16-x86-64.d
index d69626d3021..dfa36177fca 100644
--- a/ld/testsuite/ld-ifunc/ifunc-16-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-16-x86-64.d
@@ -3,6 +3,7 @@
 #ld: -shared -melf_x86_64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-17a-i386.d b/ld/testsuite/ld-ifunc/ifunc-17a-i386.d
index 303b54eb50b..0c7ff488f24 100644
--- a/ld/testsuite/ld-ifunc/ifunc-17a-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-17a-i386.d
@@ -4,6 +4,7 @@
 #as: --32
 #readelf: -s --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 #...
  +[0-9]+: +[0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[1-9] foo
diff --git a/ld/testsuite/ld-ifunc/ifunc-17a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-17a-x86-64.d
index 965ef6343dc..4bc877bf829 100644
--- a/ld/testsuite/ld-ifunc/ifunc-17a-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-17a-x86-64.d
@@ -4,6 +4,7 @@
 #as: --64
 #readelf: -s --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 #...
  +[0-9]+: +[0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[1-9] foo
diff --git a/ld/testsuite/ld-ifunc/ifunc-17b-i386.d b/ld/testsuite/ld-ifunc/ifunc-17b-i386.d
index 82ccac2feaf..5704cf143fb 100644
--- a/ld/testsuite/ld-ifunc/ifunc-17b-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-17b-i386.d
@@ -4,6 +4,7 @@
 #as: --32
 #readelf: -s --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 #...
  +[0-9]+: +[0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[1-9] foo
diff --git a/ld/testsuite/ld-ifunc/ifunc-17b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-17b-x86-64.d
index 7527eae9be7..fc449dfcfa6 100644
--- a/ld/testsuite/ld-ifunc/ifunc-17b-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-17b-x86-64.d
@@ -4,6 +4,7 @@
 #as: --64
 #readelf: -s --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 #...
  +[0-9]+: +[0-9a-f]+ +4 +OBJECT +GLOBAL +DEFAULT +[1-9] foo
diff --git a/ld/testsuite/ld-ifunc/ifunc-18a-i386.d b/ld/testsuite/ld-ifunc/ifunc-18a-i386.d
index 7c392fb881c..348b9f92b5d 100644
--- a/ld/testsuite/ld-ifunc/ifunc-18a-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-18a-i386.d
@@ -4,6 +4,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.ifunc' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-18a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-18a-x86-64.d
index e9d603176c7..2b262dd578e 100644
--- a/ld/testsuite/ld-ifunc/ifunc-18a-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-18a-x86-64.d
@@ -4,6 +4,7 @@
 #ld: -shared -melf_x86_64 -z nocombreloc
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.ifunc' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-18b-i386.d b/ld/testsuite/ld-ifunc/ifunc-18b-i386.d
index 4b63c57f57a..59dfad4193e 100644
--- a/ld/testsuite/ld-ifunc/ifunc-18b-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-18b-i386.d
@@ -4,6 +4,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.ifunc' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-18b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-18b-x86-64.d
index b4ff6c3c41c..0c95b28acb8 100644
--- a/ld/testsuite/ld-ifunc/ifunc-18b-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-18b-x86-64.d
@@ -4,6 +4,7 @@
 #ld: -shared -melf_x86_64 -z nocombreloc
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.ifunc' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-19a-i386.d b/ld/testsuite/ld-ifunc/ifunc-19a-i386.d
index 8319bfc74c2..a2c131e5971 100644
--- a/ld/testsuite/ld-ifunc/ifunc-19a-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-19a-i386.d
@@ -4,6 +4,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.ifunc' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-19a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-19a-x86-64.d
index fe576d2d333..bd4c65e8720 100644
--- a/ld/testsuite/ld-ifunc/ifunc-19a-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-19a-x86-64.d
@@ -4,6 +4,7 @@
 #ld: -shared -melf_x86_64 -z nocombreloc
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.ifunc' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-19b-i386.d b/ld/testsuite/ld-ifunc/ifunc-19b-i386.d
index 5bb81706aaf..2ca56a2865a 100644
--- a/ld/testsuite/ld-ifunc/ifunc-19b-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-19b-i386.d
@@ -4,6 +4,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.ifunc' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-19b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-19b-x86-64.d
index 35fa3285fd5..5f7a1c7f8d4 100644
--- a/ld/testsuite/ld-ifunc/ifunc-19b-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-19b-x86-64.d
@@ -4,6 +4,7 @@
 #ld: -shared -melf_x86_64 -z nocombreloc
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.ifunc' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-2-i386.d b/ld/testsuite/ld-ifunc/ifunc-2-i386.d
index 7dfc1fe3c4c..fb1ad4eeb9b 100644
--- a/ld/testsuite/ld-ifunc/ifunc-2-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-2-i386.d
@@ -2,6 +2,7 @@
 #as: --32
 #objdump: -dw
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 #...
 [ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-f]+<\*ABS\*@plt>
diff --git a/ld/testsuite/ld-ifunc/ifunc-2-local-i386.d b/ld/testsuite/ld-ifunc/ifunc-2-local-i386.d
index 7dfc1fe3c4c..fb1ad4eeb9b 100644
--- a/ld/testsuite/ld-ifunc/ifunc-2-local-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-2-local-i386.d
@@ -2,6 +2,7 @@
 #as: --32
 #objdump: -dw
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 #...
 [ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-f]+<\*ABS\*@plt>
diff --git a/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d
index 3cea6f76fcd..a20f92d93c0 100644
--- a/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-2-local-x86-64.d
@@ -2,6 +2,7 @@
 #ld: -shared -melf_x86_64 --hash-style=sysv -z noseparate-code
 #objdump: -dw
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 #...
 [ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x210@plt>
diff --git a/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
index 673b832d107..fb8bd8d3aad 100644
--- a/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-2-x86-64.d
@@ -2,6 +2,7 @@
 #ld: -shared -melf_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code
 #objdump: -dw
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 #...
 [ \t0-9a-f]+:[ \t0-9a-f]+call[ \t0-9a-fq]+<\*ABS\*\+0x210@plt>
diff --git a/ld/testsuite/ld-ifunc/ifunc-20-i386.d b/ld/testsuite/ld-ifunc/ifunc-20-i386.d
index 6a7e3eac64b..c501b04cbe0 100644
--- a/ld/testsuite/ld-ifunc/ifunc-20-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-20-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.ifunc' at offset 0x[0-9a-f]+ contains 1 entry:
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-20-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-20-x86-64.d
index 0ea46a6a2d2..57c0568a6a3 100644
--- a/ld/testsuite/ld-ifunc/ifunc-20-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-20-x86-64.d
@@ -3,6 +3,7 @@
 #as: --64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.ifunc' at offset 0x[0-9a-f]+ contains 1 entry:
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-21-i386.d b/ld/testsuite/ld-ifunc/ifunc-21-i386.d
index f28af7782fd..9e8759af673 100644
--- a/ld/testsuite/ld-ifunc/ifunc-21-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-21-i386.d
@@ -2,6 +2,7 @@
 #as: --32 -mrelax-relocations=yes
 #objdump: -dw
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 .*: +file format .*
 
diff --git a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d
index dbddc55dc3f..ac7674b0c54 100644
--- a/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-21-x86-64.d
@@ -2,6 +2,7 @@
 #ld: -melf_x86_64 -z max-page-size=0x200000 -z noseparate-code
 #objdump: -dw
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 .*: +file format .*
 
diff --git a/ld/testsuite/ld-ifunc/ifunc-22-i386.d b/ld/testsuite/ld-ifunc/ifunc-22-i386.d
index f28af7782fd..9e8759af673 100644
--- a/ld/testsuite/ld-ifunc/ifunc-22-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-22-i386.d
@@ -2,6 +2,7 @@
 #as: --32 -mrelax-relocations=yes
 #objdump: -dw
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 .*: +file format .*
 
diff --git a/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d
index dbddc55dc3f..ac7674b0c54 100644
--- a/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-22-x86-64.d
@@ -2,6 +2,7 @@
 #ld: -melf_x86_64 -z max-page-size=0x200000 -z noseparate-code
 #objdump: -dw
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 .*: +file format .*
 
diff --git a/ld/testsuite/ld-ifunc/ifunc-5a-i386.d b/ld/testsuite/ld-ifunc/ifunc-5a-i386.d
index 8fba080218f..51e4632e46f 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5a-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5a-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d b/ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d
index 88814f7f0e0..3df5f6b11be 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5a-local-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-5a-local-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-5a-local-x86-64.d
index 73a822dbf49..1926145f1af 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5a-local-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5a-local-x86-64.d
@@ -3,6 +3,7 @@
 #ld: -melf_x86_64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-5a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-5a-x86-64.d
index 46f41863bc8..5a19c9ab2e5 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5a-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5a-x86-64.d
@@ -3,6 +3,7 @@
 #ld: -melf_x86_64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-5b-i386.d b/ld/testsuite/ld-ifunc/ifunc-5b-i386.d
index e00401bb9be..f47a1957d2f 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5b-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5b-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.got' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d b/ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d
index 75cb7d9da59..be8db75c830 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5b-local-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-5b-local-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-5b-local-x86-64.d
index 3913dd60c9c..ded6fc90571 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5b-local-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5b-local-x86-64.d
@@ -3,6 +3,7 @@
 #ld: -melf_x86_64 -shared -z nocombreloc
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-5b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-5b-x86-64.d
index 02aff6b7c85..af208b9bbd1 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5b-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5b-x86-64.d
@@ -3,6 +3,7 @@
 #ld: -melf_x86_64 -shared -z nocombreloc
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.got' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-5r-local-i386.d b/ld/testsuite/ld-ifunc/ifunc-5r-local-i386.d
index 18e1295ef6b..6e7a8b3c72e 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5r-local-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5r-local-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.text' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d
index 2ce53a9efa6..710778c74ed 100644
--- a/ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-5r-local-x86-64.d
@@ -3,6 +3,7 @@
 #ld: -r -melf_x86_64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.text' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-6a-i386.d b/ld/testsuite/ld-ifunc/ifunc-6a-i386.d
index a83e62bd9ba..c4fa10e2799 100644
--- a/ld/testsuite/ld-ifunc/ifunc-6a-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-6a-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-6a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-6a-x86-64.d
index cc3ff94d5ee..1333fbecb11 100644
--- a/ld/testsuite/ld-ifunc/ifunc-6a-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-6a-x86-64.d
@@ -3,6 +3,7 @@
 #ld: -melf_x86_64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-6b-i386.d b/ld/testsuite/ld-ifunc/ifunc-6b-i386.d
index e53fc72ff31..6ed595b3b07 100644
--- a/ld/testsuite/ld-ifunc/ifunc-6b-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-6b-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.got' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-6b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-6b-x86-64.d
index 16ccfd7cfd1..34fdb4249d7 100644
--- a/ld/testsuite/ld-ifunc/ifunc-6b-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-6b-x86-64.d
@@ -3,6 +3,7 @@
 #ld: -melf_x86_64 -shared -z nocombreloc
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.got' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-7a-i386.d b/ld/testsuite/ld-ifunc/ifunc-7a-i386.d
index 6b4afe156eb..fda1fb9aa76 100644
--- a/ld/testsuite/ld-ifunc/ifunc-7a-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-7a-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-7a-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-7a-x86-64.d
index 25444019693..a2dca3d84fc 100644
--- a/ld/testsuite/ld-ifunc/ifunc-7a-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-7a-x86-64.d
@@ -3,6 +3,7 @@
 #ld: -melf_x86_64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-7b-i386.d b/ld/testsuite/ld-ifunc/ifunc-7b-i386.d
index 31cdd974772..66f5a629abc 100644
--- a/ld/testsuite/ld-ifunc/ifunc-7b-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-7b-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-7b-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-7b-x86-64.d
index 846fe34e89f..b44150f43ca 100644
--- a/ld/testsuite/ld-ifunc/ifunc-7b-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-7b-x86-64.d
@@ -3,6 +3,7 @@
 #ld: -melf_x86_64 -shared
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-8-i386.d b/ld/testsuite/ld-ifunc/ifunc-8-i386.d
index e40a9e6dc91..3730a4fd9c2 100644
--- a/ld/testsuite/ld-ifunc/ifunc-8-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-8-i386.d
@@ -4,6 +4,7 @@
 #as: --32
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-8-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-8-x86-64.d
index ad6a5ddfacc..a9c039a4547 100644
--- a/ld/testsuite/ld-ifunc/ifunc-8-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-8-x86-64.d
@@ -4,6 +4,7 @@
 #ld: -melf_x86_64
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-9-i386.d b/ld/testsuite/ld-ifunc/ifunc-9-i386.d
index 754ee2decad..adf84715d0d 100644
--- a/ld/testsuite/ld-ifunc/ifunc-9-i386.d
+++ b/ld/testsuite/ld-ifunc/ifunc-9-i386.d
@@ -3,6 +3,7 @@
 #ld: -m elf_i386 --export-dynamic
 #readelf: -r --wide
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 Relocation section '.rel.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/ifunc-9-x86-64.d b/ld/testsuite/ld-ifunc/ifunc-9-x86-64.d
index 85c3a691502..37ff2ec4296 100644
--- a/ld/testsuite/ld-ifunc/ifunc-9-x86-64.d
+++ b/ld/testsuite/ld-ifunc/ifunc-9-x86-64.d
@@ -3,6 +3,7 @@
 #ld: -melf_x86_64 --export-dynamic
 #readelf: -r --wide
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 Relocation section '.rela.plt' at .*
 [ ]+Offset[ ]+Info[ ]+Type[ ]+.*
diff --git a/ld/testsuite/ld-ifunc/pr17154-i386.d b/ld/testsuite/ld-ifunc/pr17154-i386.d
index 854d73abd8e..ce3cbef71e2 100644
--- a/ld/testsuite/ld-ifunc/pr17154-i386.d
+++ b/ld/testsuite/ld-ifunc/pr17154-i386.d
@@ -3,6 +3,7 @@
 #as: --32
 #objdump: -dw
 #target: x86_64-*-* i?86-*-*
+#notarget: x86_64-*-nacl* i?86-*-nacl*
 
 #...
 0+1d0 <.*>:
diff --git a/ld/testsuite/ld-ifunc/pr17154-x86-64-now.d b/ld/testsuite/ld-ifunc/pr17154-x86-64-now.d
index da5d7ce72d4..7e72d147e57 100644
--- a/ld/testsuite/ld-ifunc/pr17154-x86-64-now.d
+++ b/ld/testsuite/ld-ifunc/pr17154-x86-64-now.d
@@ -4,6 +4,7 @@
 #objdump: -dw
 #target: x86_64-*-*
 #notarget: x86_64-*-nacl*
+#notarget: x86_64-*-nacl*
 
 .*: +file format .*
 
diff --git a/ld/testsuite/ld-ifunc/pr17154-x86-64.d b/ld/testsuite/ld-ifunc/pr17154-x86-64.d
index 737fb258dbc..cab2fb42855 100644
--- a/ld/testsuite/ld-ifunc/pr17154-x86-64.d
+++ b/ld/testsuite/ld-ifunc/pr17154-x86-64.d
@@ -3,6 +3,7 @@
 #ld: -shared -melf_x86_64 --hash-style=sysv -z max-page-size=0x200000 -z noseparate-code
 #objdump: -dw
 #target: x86_64-*-*
+#notarget: x86_64-*-nacl*
 
 #...
 0+2b0 <.*>: