summaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
Diffstat (limited to 'ld')
-rw-r--r--ld/testsuite/ChangeLog15
-rw-r--r--ld/testsuite/ld-i386/i386.exp2
-rw-r--r--ld/testsuite/ld-i386/protected4.d5
-rw-r--r--ld/testsuite/ld-i386/protected4.s12
-rw-r--r--ld/testsuite/ld-i386/protected5.d5
-rw-r--r--ld/testsuite/ld-i386/protected5.s12
-rw-r--r--ld/testsuite/ld-x86-64/protected4.d5
-rw-r--r--ld/testsuite/ld-x86-64/protected4.s12
-rw-r--r--ld/testsuite/ld-x86-64/protected5.d5
-rw-r--r--ld/testsuite/ld-x86-64/protected5.s12
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp2
11 files changed, 87 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 1bcf098d90..ac06f535b8 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,18 @@
+2012-03-20 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/13880
+ * ld-i386/i386.exp: Run protected4 and protected5.
+ * ld-x86-64/x86-64.exp: Likewise.
+
+ * ld-i386/protected4.d: New.
+ * ld-i386/protected4.s: Likewise.
+ * ld-i386/protected5.d: Likewise.
+ * ld-i386/protected5.s: Likewise.
+ * ld-x86-64/protected4.d: Likewise.
+ * ld-x86-64/protected4.s: Likewise.
+ * ld-x86-64/protected5.d: Likewise.
+ * ld-x86-64/protected5.s: Likewise.
+
2012-03-19 Andreas Schwab <schwab@linux-m68k.org>
* ld-m68k/m68k.exp ("TLS indirect symbol use"): Pass
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index 1727922400..ff9db9829e 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -194,6 +194,8 @@ run_dump_test "hidden3"
run_dump_test "protected1"
run_dump_test "protected2"
run_dump_test "protected3"
+run_dump_test "protected4"
+run_dump_test "protected5"
run_dump_test "tlspie1"
run_dump_test "tlspie2"
run_dump_test "nogot1"
diff --git a/ld/testsuite/ld-i386/protected4.d b/ld/testsuite/ld-i386/protected4.d
new file mode 100644
index 0000000000..f16f0c0bca
--- /dev/null
+++ b/ld/testsuite/ld-i386/protected4.d
@@ -0,0 +1,5 @@
+#as: --32
+#ld: -shared -Bsymbolic -melf_i386
+#readelf: -r
+
+There are no relocations in this file.
diff --git a/ld/testsuite/ld-i386/protected4.s b/ld/testsuite/ld-i386/protected4.s
new file mode 100644
index 0000000000..66f2a56dfc
--- /dev/null
+++ b/ld/testsuite/ld-i386/protected4.s
@@ -0,0 +1,12 @@
+ .text
+ .protected foo
+ .globl foo
+ .type foo, @function
+foo:
+ ret
+ .size foo, .-foo
+ .globl bar
+ .type bar, @function
+bar:
+ movl foo@GOTOFF(%ecx), %eax
+ .size bar, .-bar
diff --git a/ld/testsuite/ld-i386/protected5.d b/ld/testsuite/ld-i386/protected5.d
new file mode 100644
index 0000000000..89e21592b8
--- /dev/null
+++ b/ld/testsuite/ld-i386/protected5.d
@@ -0,0 +1,5 @@
+#as: --32
+#ld: -pie -melf_i386
+#readelf: -r
+
+There are no relocations in this file.
diff --git a/ld/testsuite/ld-i386/protected5.s b/ld/testsuite/ld-i386/protected5.s
new file mode 100644
index 0000000000..fc218f2a32
--- /dev/null
+++ b/ld/testsuite/ld-i386/protected5.s
@@ -0,0 +1,12 @@
+ .text
+ .protected foo
+ .globl foo
+ .type foo, @function
+foo:
+ ret
+ .size foo, .-foo
+ .globl _start
+ .type _start, @function
+_start:
+ movl foo@GOTOFF(%ecx), %eax
+ .size _start, .-_start
diff --git a/ld/testsuite/ld-x86-64/protected4.d b/ld/testsuite/ld-x86-64/protected4.d
new file mode 100644
index 0000000000..a8a898053e
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/protected4.d
@@ -0,0 +1,5 @@
+#as: --64
+#ld: -shared -Bsymbolic -melf_x86_64
+#readelf: -r
+
+There are no relocations in this file.
diff --git a/ld/testsuite/ld-x86-64/protected4.s b/ld/testsuite/ld-x86-64/protected4.s
new file mode 100644
index 0000000000..c6e41ec189
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/protected4.s
@@ -0,0 +1,12 @@
+ .text
+ .protected foo
+ .globl foo
+ .type foo, @function
+foo:
+ ret
+ .size foo, .-foo
+ .globl bar
+ .type bar, @function
+bar:
+ movabsq $foo@GOTOFF, %rax
+ .size bar, .-bar
diff --git a/ld/testsuite/ld-x86-64/protected5.d b/ld/testsuite/ld-x86-64/protected5.d
new file mode 100644
index 0000000000..afe172a425
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/protected5.d
@@ -0,0 +1,5 @@
+#as: --64
+#ld: -pie -melf_x86_64
+#readelf: -r
+
+There are no relocations in this file.
diff --git a/ld/testsuite/ld-x86-64/protected5.s b/ld/testsuite/ld-x86-64/protected5.s
new file mode 100644
index 0000000000..8e14138043
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/protected5.s
@@ -0,0 +1,12 @@
+ .text
+ .protected foo
+ .globl foo
+ .type foo, @function
+foo:
+ ret
+ .size foo, .-foo
+ .globl _start
+ .type _start, @function
+_start:
+ movabsq $foo@GOTOFF, %rax
+ .size _start, .-_start
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index f713ca51a1..c258251853 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -158,6 +158,8 @@ run_dump_test "protected2"
run_dump_test "protected2-l1om"
run_dump_test "protected3"
run_dump_test "protected3-l1om"
+run_dump_test "protected4"
+run_dump_test "protected5"
run_dump_test "tlsle1"
run_dump_test "tlspie1"
run_dump_test "unique1"