aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog9
-rw-r--r--ld/testsuite/ld-i386/i386.exp1
-rw-r--r--ld/testsuite/ld-i386/pltgot-1.d5
-rw-r--r--ld/testsuite/ld-i386/pltgot-2.d9
-rw-r--r--ld/testsuite/ld-x86-64/pltgot-1.d5
-rw-r--r--ld/testsuite/ld-x86-64/pltgot-2.d9
-rw-r--r--ld/testsuite/ld-x86-64/x86-64.exp1
7 files changed, 35 insertions, 4 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 812549c..2031bc8 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2015-06-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ * ld-i386/i386.exp: Run pltgot-2 for Linux targets.
+ * ld-x86-64/x86-64.exp: Likewise.
+ * ld-i386/pltgot-1.d: Updated.
+ * ld-x86-64/pltgot-1.d: Likewise.
+ * ld-i386/pltgot-2.d: New file.
+ * ld-x86-64/pltgot-2.d: Likewise.
+
2015-06-23 Jiong Wang <jiong.wang@arm.com>
* ld-aarch64/dt_textrel.s: New testcase.
diff --git a/ld/testsuite/ld-i386/i386.exp b/ld/testsuite/ld-i386/i386.exp
index a26cffd..61f9599 100644
--- a/ld/testsuite/ld-i386/i386.exp
+++ b/ld/testsuite/ld-i386/i386.exp
@@ -525,3 +525,4 @@ if { !([istarget "i?86-*-linux*"]
# Linux only tests
run_dump_test "pltgot-1"
+run_dump_test "pltgot-2"
diff --git a/ld/testsuite/ld-i386/pltgot-1.d b/ld/testsuite/ld-i386/pltgot-1.d
index 6629635..165ae33 100644
--- a/ld/testsuite/ld-i386/pltgot-1.d
+++ b/ld/testsuite/ld-i386/pltgot-1.d
@@ -2,7 +2,8 @@
#readelf: -S --wide
#as: --32
-#failif
#...
- +\[ [0-9]+\] \.plt +PROGBITS +.*
+ +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.*
#...
+ +\[ *[0-9]+\] \.got\.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+c +.*
+#pass
diff --git a/ld/testsuite/ld-i386/pltgot-2.d b/ld/testsuite/ld-i386/pltgot-2.d
new file mode 100644
index 0000000..3b87898
--- /dev/null
+++ b/ld/testsuite/ld-i386/pltgot-2.d
@@ -0,0 +1,9 @@
+#source: pltgot-1.s
+#ld: -shared -melf_i386
+#readelf: -d --wide
+#as: --32
+
+#failif
+#...
+ +0x[0-9a-f]+ +\(PLTREL.*
+#...
diff --git a/ld/testsuite/ld-x86-64/pltgot-1.d b/ld/testsuite/ld-x86-64/pltgot-1.d
index 9a6c2fd6..17d4f43 100644
--- a/ld/testsuite/ld-x86-64/pltgot-1.d
+++ b/ld/testsuite/ld-x86-64/pltgot-1.d
@@ -2,7 +2,8 @@
#readelf: -S --wide
#as: --64
-#failif
#...
- +\[ [0-9]+\] \.plt +PROGBITS +.*
+ +\[ *[0-9]+\] \.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+10 +.*
#...
+ +\[ *[0-9]+\] \.got\.plt +PROGBITS +[0-9a-f]+ +[0-9a-f]+ +0+18 +.*
+#pass
diff --git a/ld/testsuite/ld-x86-64/pltgot-2.d b/ld/testsuite/ld-x86-64/pltgot-2.d
new file mode 100644
index 0000000..086d6dd
--- /dev/null
+++ b/ld/testsuite/ld-x86-64/pltgot-2.d
@@ -0,0 +1,9 @@
+#source: pltgot-1.s
+#ld: -shared -melf_x86_64
+#readelf: -d --wide
+#as: --64
+
+#failif
+#...
+ +0x[0-9a-f]+ +\(PLTREL.*
+#...
diff --git a/ld/testsuite/ld-x86-64/x86-64.exp b/ld/testsuite/ld-x86-64/x86-64.exp
index 8281dc4..3669446 100644
--- a/ld/testsuite/ld-x86-64/x86-64.exp
+++ b/ld/testsuite/ld-x86-64/x86-64.exp
@@ -574,3 +574,4 @@ if { ![istarget "x86_64-*-linux*"]} {
# Linux only tests
run_dump_test "pr17618"
run_dump_test "pltgot-1"
+run_dump_test "pltgot-2"