Add 2 tests for PR ld/11812.
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 1 Oct 2010 04:47:02 +0000 (04:47 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 1 Oct 2010 04:47:02 +0000 (04:47 +0000)
2010-09-30  H.J. Lu  <hongjiu.lu@intel.com>

PR ld/11812
* ld-i386/nogot2.d: New
* ld-i386/nogot2.s: Likewise.
* ld-x86-64/nogot2.d: Likewise.
* ld-x86-64/nogot2.s: Likewise.

* ld-i386/i386.exp: Run nogot2.
* ld-x86-64/x86-64.exp: Likewise.

ld/testsuite/ChangeLog
ld/testsuite/ld-i386/i386.exp
ld/testsuite/ld-i386/nogot2.d [new file with mode: 0644]
ld/testsuite/ld-i386/nogot2.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/nogot2.d [new file with mode: 0644]
ld/testsuite/ld-x86-64/nogot2.s [new file with mode: 0644]
ld/testsuite/ld-x86-64/x86-64.exp

index 5e9b9c1eea34854edf7950adb5a72cfea71dab7a..3342d62d2ce15f526eda4fc4467b52602c6353f3 100644 (file)
@@ -1,3 +1,14 @@
+2010-09-30  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR ld/11812
+       * ld-i386/nogot2.d: New
+       * ld-i386/nogot2.s: Likewise.
+       * ld-x86-64/nogot2.d: Likewise.
+       * ld-x86-64/nogot2.s: Likewise.
+
+       * ld-i386/i386.exp: Run nogot2.
+       * ld-x86-64/x86-64.exp: Likewise.
+
 2010-09-29  Alan Modra  <amodra@gmail.com>
 
        * ld-h8300/h8300.exp: Use is_elf_format.
index 86ba9e47d1a0b6a7651188a9b394ae809ddb0a63..6777c5f675572fbd5e7e90a3b5bab98b8aab2aa9 100644 (file)
@@ -190,6 +190,7 @@ run_dump_test "protected2"
 run_dump_test "protected3"
 run_dump_test "tlspie1"
 run_dump_test "nogot1"
+run_dump_test "nogot2"
 run_dump_test "discarded1"
 
 if { !([istarget "i?86-*-linux*"]
diff --git a/ld/testsuite/ld-i386/nogot2.d b/ld/testsuite/ld-i386/nogot2.d
new file mode 100644 (file)
index 0000000..a7bb788
--- /dev/null
@@ -0,0 +1,7 @@
+#ld: -pie -melf_i386
+#readelf: -S --wide
+#as: --32
+
+#...
+[      ]*\[.*\][       ]+.*\.got\.plt.*
+#pass
diff --git a/ld/testsuite/ld-i386/nogot2.s b/ld/testsuite/ld-i386/nogot2.s
new file mode 100644 (file)
index 0000000..e7212cb
--- /dev/null
@@ -0,0 +1,4 @@
+        .text
+        .globl _start
+_start:
+        movl _GLOBAL_OFFSET_TABLE_, %ecx
diff --git a/ld/testsuite/ld-x86-64/nogot2.d b/ld/testsuite/ld-x86-64/nogot2.d
new file mode 100644 (file)
index 0000000..c6123c5
--- /dev/null
@@ -0,0 +1,7 @@
+#ld: -pie -melf_x86_64
+#readelf: -S --wide
+#as: --64
+
+#...
+[      ]*\[.*\][       ]+.*\.got\.plt.*
+#pass
diff --git a/ld/testsuite/ld-x86-64/nogot2.s b/ld/testsuite/ld-x86-64/nogot2.s
new file mode 100644 (file)
index 0000000..530e909
--- /dev/null
@@ -0,0 +1,4 @@
+        .text
+        .globl _start
+_start:
+        movq _GLOBAL_OFFSET_TABLE_(%rip), %rcx
index 1d3d67e4f510c362e4eb536db3b4ab75ff4f4b28..12f5cad635dfb3772f36340bc2a9494ecce5f814 100644 (file)
@@ -133,6 +133,7 @@ run_dump_test "tlsle1"
 run_dump_test "tlspie1"
 run_dump_test "unique1"
 run_dump_test "nogot1"
+run_dump_test "nogot2"
 run_dump_test "discarded1"
 
 if { ![istarget "x86_64-*-linux*"] } {