[4/8] i386: Add -z noseparate-code to linker tests

Message ID 20180215142643.32242-4-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.
Add -z noseparate-code since these tests check for exact addresses.

	* testsuite/ld-i386/ibt-plt-1.d: Add -z noseparate-code.
	* testsuite/ld-i386/ibt-plt-2a.d: Likewise.
	* testsuite/ld-i386/ibt-plt-2b.d: Likewise.
	* testsuite/ld-i386/ibt-plt-2c.d: Likewise.
	* testsuite/ld-i386/ibt-plt-2d.d: Likewise.
	* testsuite/ld-i386/ibt-plt-3a.d: Likewise.
	* testsuite/ld-i386/ibt-plt-3b.d: Likewise.
	* testsuite/ld-i386/ibt-plt-3c.d: Likewise.
	* testsuite/ld-i386/ibt-plt-3d.d: Likewise.
	* testsuite/ld-i386/load1.d: Likewise.
	* testsuite/ld-i386/pie1.d: Likewise.
	* testsuite/ld-i386/pr20244-1a.d: Likewise.
	* testsuite/ld-i386/pr20244-1b.d: Likewise.
	* testsuite/ld-i386/pr20244-2a.d: Likewise.
	* testsuite/ld-i386/pr20244-2b.d: Likewise.
	* testsuite/ld-i386/pr20244-2c.d: Likewise.
	* testsuite/ld-i386/pr20244-4a.d: Likewise.
	* testsuite/ld-i386/pr20244-4b.d: Likewise.
	* testsuite/ld-i386/pr20830.d: Likewise.
---
 ld/testsuite/ld-i386/ibt-plt-1.d  | 2 +-
 ld/testsuite/ld-i386/ibt-plt-2a.d | 2 +-
 ld/testsuite/ld-i386/ibt-plt-2b.d | 2 +-
 ld/testsuite/ld-i386/ibt-plt-2c.d | 2 +-
 ld/testsuite/ld-i386/ibt-plt-2d.d | 2 +-
 ld/testsuite/ld-i386/ibt-plt-3a.d | 2 +-
 ld/testsuite/ld-i386/ibt-plt-3b.d | 2 +-
 ld/testsuite/ld-i386/ibt-plt-3c.d | 2 +-
 ld/testsuite/ld-i386/ibt-plt-3d.d | 2 +-
 ld/testsuite/ld-i386/load1.d      | 2 +-
 ld/testsuite/ld-i386/pie1.d       | 2 +-
 ld/testsuite/ld-i386/pr20244-1a.d | 2 +-
 ld/testsuite/ld-i386/pr20244-1b.d | 2 +-
 ld/testsuite/ld-i386/pr20244-2a.d | 2 +-
 ld/testsuite/ld-i386/pr20244-2b.d | 2 +-
 ld/testsuite/ld-i386/pr20244-2c.d | 2 +-
 ld/testsuite/ld-i386/pr20244-4a.d | 2 +-
 ld/testsuite/ld-i386/pr20244-4b.d | 2 +-
 ld/testsuite/ld-i386/pr20830.d    | 2 +-
 19 files changed, 19 insertions(+), 19 deletions(-)

-- 
2.14.3

Comments

H.J. Lu Feb. 16, 2018, 5:02 p.m. | #1
On Thu, Feb 15, 2018 at 6:26 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> Add -z noseparate-code since these tests check for exact addresses.

>

>         * testsuite/ld-i386/ibt-plt-1.d: Add -z noseparate-code.

>         * testsuite/ld-i386/ibt-plt-2a.d: Likewise.

>         * testsuite/ld-i386/ibt-plt-2b.d: Likewise.

>         * testsuite/ld-i386/ibt-plt-2c.d: Likewise.

>         * testsuite/ld-i386/ibt-plt-2d.d: Likewise.

>         * testsuite/ld-i386/ibt-plt-3a.d: Likewise.

>         * testsuite/ld-i386/ibt-plt-3b.d: Likewise.

>         * testsuite/ld-i386/ibt-plt-3c.d: Likewise.

>         * testsuite/ld-i386/ibt-plt-3d.d: Likewise.

>         * testsuite/ld-i386/load1.d: Likewise.

>         * testsuite/ld-i386/pie1.d: Likewise.

>         * testsuite/ld-i386/pr20244-1a.d: Likewise.

>         * testsuite/ld-i386/pr20244-1b.d: Likewise.

>         * testsuite/ld-i386/pr20244-2a.d: Likewise.

>         * testsuite/ld-i386/pr20244-2b.d: Likewise.

>         * testsuite/ld-i386/pr20244-2c.d: Likewise.

>         * testsuite/ld-i386/pr20244-4a.d: Likewise.

>         * testsuite/ld-i386/pr20244-4b.d: Likewise.

>         * testsuite/ld-i386/pr20830.d: Likewise.


I am checking this in.

-- 
H.J.

Patch

diff --git a/ld/testsuite/ld-i386/ibt-plt-1.d b/ld/testsuite/ld-i386/ibt-plt-1.d
index a131675328..e164095e44 100644
--- a/ld/testsuite/ld-i386/ibt-plt-1.d
+++ b/ld/testsuite/ld-i386/ibt-plt-1.d
@@ -1,5 +1,5 @@ 
 #as: --32
-#ld: -shared -m elf_i386 --hash-style=sysv
+#ld: -shared -m elf_i386 --hash-style=sysv -z noseparate-code
 #objdump: -dw
 
 .*: +file format .*
diff --git a/ld/testsuite/ld-i386/ibt-plt-2a.d b/ld/testsuite/ld-i386/ibt-plt-2a.d
index 13c6949e0d..6b84a3a1d4 100644
--- a/ld/testsuite/ld-i386/ibt-plt-2a.d
+++ b/ld/testsuite/ld-i386/ibt-plt-2a.d
@@ -1,6 +1,6 @@ 
 #source: ibt-plt-2.s
 #as: --32
-#ld: -shared -m elf_i386 -z ibtplt --hash-style=sysv
+#ld: -shared -m elf_i386 -z ibtplt --hash-style=sysv -z noseparate-code
 #objdump: -dw
 
 .*: +file format .*
diff --git a/ld/testsuite/ld-i386/ibt-plt-2b.d b/ld/testsuite/ld-i386/ibt-plt-2b.d
index 90541f19f6..2927290b35 100644
--- a/ld/testsuite/ld-i386/ibt-plt-2b.d
+++ b/ld/testsuite/ld-i386/ibt-plt-2b.d
@@ -1,6 +1,6 @@ 
 #source: ibt-plt-2.s
 #as: --32
-#ld: -shared -m elf_i386 -z ibtplt --hash-style=sysv
+#ld: -shared -m elf_i386 -z ibtplt --hash-style=sysv -z noseparate-code
 #readelf: -n -wf
 
 Contents of the .eh_frame section:
diff --git a/ld/testsuite/ld-i386/ibt-plt-2c.d b/ld/testsuite/ld-i386/ibt-plt-2c.d
index 63f4427221..f3d9fafd70 100644
--- a/ld/testsuite/ld-i386/ibt-plt-2c.d
+++ b/ld/testsuite/ld-i386/ibt-plt-2c.d
@@ -1,6 +1,6 @@ 
 #source: ibt-plt-2.s
 #as: --32
-#ld: -shared -m elf_i386 -z ibt --hash-style=sysv
+#ld: -shared -m elf_i386 -z ibt --hash-style=sysv -z noseparate-code
 #objdump: -dw
 
 .*: +file format .*
diff --git a/ld/testsuite/ld-i386/ibt-plt-2d.d b/ld/testsuite/ld-i386/ibt-plt-2d.d
index f57c7e84e3..efd0cd8644 100644
--- a/ld/testsuite/ld-i386/ibt-plt-2d.d
+++ b/ld/testsuite/ld-i386/ibt-plt-2d.d
@@ -1,6 +1,6 @@ 
 #source: ibt-plt-2.s
 #as: --32
-#ld: -shared -m elf_i386 -z ibt --hash-style=sysv
+#ld: -shared -m elf_i386 -z ibt --hash-style=sysv -z noseparate-code
 #readelf: -n -wf
 
 Contents of the .eh_frame section:
diff --git a/ld/testsuite/ld-i386/ibt-plt-3a.d b/ld/testsuite/ld-i386/ibt-plt-3a.d
index 5455c928eb..a9c0f53a11 100644
--- a/ld/testsuite/ld-i386/ibt-plt-3a.d
+++ b/ld/testsuite/ld-i386/ibt-plt-3a.d
@@ -1,6 +1,6 @@ 
 #source: ibt-plt-3.s
 #as: --32
-#ld: -shared -m elf_i386 -z ibtplt --hash-style=sysv
+#ld: -shared -m elf_i386 -z ibtplt --hash-style=sysv -z noseparate-code
 #objdump: -dw
 
 .*: +file format .*
diff --git a/ld/testsuite/ld-i386/ibt-plt-3b.d b/ld/testsuite/ld-i386/ibt-plt-3b.d
index 6e6637ff9a..fa66d63860 100644
--- a/ld/testsuite/ld-i386/ibt-plt-3b.d
+++ b/ld/testsuite/ld-i386/ibt-plt-3b.d
@@ -1,6 +1,6 @@ 
 #source: ibt-plt-3.s
 #as: --32
-#ld: -shared -m elf_i386 -z ibtplt --hash-style=sysv
+#ld: -shared -m elf_i386 -z ibtplt --hash-style=sysv -z noseparate-code
 #readelf: -wf -n
 
 Contents of the .eh_frame section:
diff --git a/ld/testsuite/ld-i386/ibt-plt-3c.d b/ld/testsuite/ld-i386/ibt-plt-3c.d
index 5455c928eb..a9c0f53a11 100644
--- a/ld/testsuite/ld-i386/ibt-plt-3c.d
+++ b/ld/testsuite/ld-i386/ibt-plt-3c.d
@@ -1,6 +1,6 @@ 
 #source: ibt-plt-3.s
 #as: --32
-#ld: -shared -m elf_i386 -z ibtplt --hash-style=sysv
+#ld: -shared -m elf_i386 -z ibtplt --hash-style=sysv -z noseparate-code
 #objdump: -dw
 
 .*: +file format .*
diff --git a/ld/testsuite/ld-i386/ibt-plt-3d.d b/ld/testsuite/ld-i386/ibt-plt-3d.d
index 1ef91db7fc..231798c02b 100644
--- a/ld/testsuite/ld-i386/ibt-plt-3d.d
+++ b/ld/testsuite/ld-i386/ibt-plt-3d.d
@@ -1,6 +1,6 @@ 
 #source: ibt-plt-3.s
 #as: --32
-#ld: -shared -m elf_i386 -z ibt --hash-style=sysv
+#ld: -shared -m elf_i386 -z ibt --hash-style=sysv -z noseparate-code
 #readelf: -wf -n
 
 Contents of the .eh_frame section:
diff --git a/ld/testsuite/ld-i386/load1.d b/ld/testsuite/ld-i386/load1.d
index 2e4957b0ad..8e8db9f43b 100644
--- a/ld/testsuite/ld-i386/load1.d
+++ b/ld/testsuite/ld-i386/load1.d
@@ -1,5 +1,5 @@ 
 #as: --32 -mrelax-relocations=yes
-#ld: -melf_i386
+#ld: -melf_i386 -z noseparate-code
 #objdump: -dw --sym
 #notarget: i?86-*-nacl* x86_64-*-nacl*
 
diff --git a/ld/testsuite/ld-i386/pie1.d b/ld/testsuite/ld-i386/pie1.d
index e77b8dc04f..e7beaa2400 100644
--- a/ld/testsuite/ld-i386/pie1.d
+++ b/ld/testsuite/ld-i386/pie1.d
@@ -1,5 +1,5 @@ 
 #as: --32
-#ld: -pie -melf_i386 -z relro
+#ld: -pie -melf_i386 -z relro -z noseparate-code
 #objdump: -dw --sym
 #notarget: i?86-*-nacl* x86_64-*-nacl*
 
diff --git a/ld/testsuite/ld-i386/pr20244-1a.d b/ld/testsuite/ld-i386/pr20244-1a.d
index 46ae4beb47..98aaa9e01b 100644
--- a/ld/testsuite/ld-i386/pr20244-1a.d
+++ b/ld/testsuite/ld-i386/pr20244-1a.d
@@ -1,6 +1,6 @@ 
 #source: pr20244-1.s
 #as: --32
-#ld: -m elf_i386
+#ld: -m elf_i386 -z noseparate-code
 #objdump: --sym -dw
 #notarget: i?86-*-nacl* x86_64-*-nacl*
 
diff --git a/ld/testsuite/ld-i386/pr20244-1b.d b/ld/testsuite/ld-i386/pr20244-1b.d
index d8ac4aaffd..f5a1a61ca7 100644
--- a/ld/testsuite/ld-i386/pr20244-1b.d
+++ b/ld/testsuite/ld-i386/pr20244-1b.d
@@ -1,6 +1,6 @@ 
 #source: pr20244-1.s
 #as: --32
-#ld: -m elf_i386
+#ld: -m elf_i386 -z noseparate-code
 #objdump: -s -j .got
 #notarget: i?86-*-nacl* x86_64-*-nacl*
 
diff --git a/ld/testsuite/ld-i386/pr20244-2a.d b/ld/testsuite/ld-i386/pr20244-2a.d
index ec3948e5bc..40c6e32c94 100644
--- a/ld/testsuite/ld-i386/pr20244-2a.d
+++ b/ld/testsuite/ld-i386/pr20244-2a.d
@@ -1,6 +1,6 @@ 
 #source: pr20244-2.s
 #as: --32
-#ld: -m elf_i386
+#ld: -m elf_i386 -z noseparate-code
 #objdump: --sym -dw
 #notarget: i?86-*-nacl* x86_64-*-nacl*
 
diff --git a/ld/testsuite/ld-i386/pr20244-2b.d b/ld/testsuite/ld-i386/pr20244-2b.d
index f23a406553..406d3bd3a7 100644
--- a/ld/testsuite/ld-i386/pr20244-2b.d
+++ b/ld/testsuite/ld-i386/pr20244-2b.d
@@ -1,6 +1,6 @@ 
 #source: pr20244-2.s
 #as: --32
-#ld: -m elf_i386
+#ld: -m elf_i386 -z noseparate-code
 #objdump: -s -j .got.plt
 #notarget: i?86-*-nacl* x86_64-*-nacl*
 
diff --git a/ld/testsuite/ld-i386/pr20244-2c.d b/ld/testsuite/ld-i386/pr20244-2c.d
index acca560000..142ec2748b 100644
--- a/ld/testsuite/ld-i386/pr20244-2c.d
+++ b/ld/testsuite/ld-i386/pr20244-2c.d
@@ -1,6 +1,6 @@ 
 #source: pr20244-2.s
 #as: --32
-#ld: -m elf_i386
+#ld: -m elf_i386 -z noseparate-code
 #readelf: -rW
 #notarget: i?86-*-nacl* x86_64-*-nacl*
 
diff --git a/ld/testsuite/ld-i386/pr20244-4a.d b/ld/testsuite/ld-i386/pr20244-4a.d
index 420d179a60..7e6fe3690d 100644
--- a/ld/testsuite/ld-i386/pr20244-4a.d
+++ b/ld/testsuite/ld-i386/pr20244-4a.d
@@ -1,6 +1,6 @@ 
 #source: pr20244-4.s
 #as: --32
-#ld: -m elf_i386
+#ld: -m elf_i386 -z noseparate-code
 #objdump: -dw
 #notarget: i?86-*-nacl* x86_64-*-nacl*
 
diff --git a/ld/testsuite/ld-i386/pr20244-4b.d b/ld/testsuite/ld-i386/pr20244-4b.d
index 16e524353a..946f56b0d1 100644
--- a/ld/testsuite/ld-i386/pr20244-4b.d
+++ b/ld/testsuite/ld-i386/pr20244-4b.d
@@ -1,6 +1,6 @@ 
 #source: pr20244-4.s
 #as: --32
-#ld: -m elf_i386
+#ld: -m elf_i386 -z noseparate-code
 #objdump: -s -j .got
 #notarget: i?86-*-nacl* x86_64-*-nacl*
 
diff --git a/ld/testsuite/ld-i386/pr20830.d b/ld/testsuite/ld-i386/pr20830.d
index 26caabb950..a16ea67c49 100644
--- a/ld/testsuite/ld-i386/pr20830.d
+++ b/ld/testsuite/ld-i386/pr20830.d
@@ -1,6 +1,6 @@ 
 #name: PR ld/20830 (.plt.got)
 #as: --32
-#ld: -melf_i386 -shared -z relro --ld-generated-unwind-info --hash-style=sysv
+#ld: -melf_i386 -shared -z relro --ld-generated-unwind-info --hash-style=sysv -z noseparate-code
 #objdump: -dw -Wf
 
 .*: +file format .*