aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2020-06-04 12:41:46 +0930
committerAlan Modra <amodra@gmail.com>2020-06-04 14:13:04 +0930
commita0c0ad56704002e6438bdd077378de8d8cc1e1a9 (patch)
tree72b75fec92427f73a4da04938471a2f0c504ba6b
parent60f207b4a9599bde4050ee683d99bbd9b0f57278 (diff)
downloadgdb-a0c0ad56704002e6438bdd077378de8d8cc1e1a9.zip
gdb-a0c0ad56704002e6438bdd077378de8d8cc1e1a9.tar.gz
gdb-a0c0ad56704002e6438bdd077378de8d8cc1e1a9.tar.bz2
ld-dynamic test fixes
* testsuite/ld-dynamic/export-dynamic-symbol-2.d: Match output for mips-sgi-irix6. * testsuite/ld-dynamic/export-dynamic-symbol-glob.d: Likewise. * testsuite/ld-dynamic/export-dynamic-symbol-list-2.d: Likewise. * testsuite/ld-dynamic/export-dynamic-symbol-list-glob.d: Likewise. * testsuite/ld-dynamic/export-dynamic-symbol.exp: Exclude targets with poor PIE support.
-rw-r--r--ld/ChangeLog10
-rw-r--r--ld/testsuite/ld-dynamic/export-dynamic-symbol-2.d7
-rw-r--r--ld/testsuite/ld-dynamic/export-dynamic-symbol-glob.d3
-rw-r--r--ld/testsuite/ld-dynamic/export-dynamic-symbol-list-2.d5
-rw-r--r--ld/testsuite/ld-dynamic/export-dynamic-symbol-list-glob.d3
-rw-r--r--ld/testsuite/ld-dynamic/export-dynamic-symbol.exp11
6 files changed, 31 insertions, 8 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 363685d..518d40c 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,15 @@
2020-06-04 Alan Modra <amodra@gmail.com>
+ * testsuite/ld-dynamic/export-dynamic-symbol-2.d: Match output for
+ mips-sgi-irix6.
+ * testsuite/ld-dynamic/export-dynamic-symbol-glob.d: Likewise.
+ * testsuite/ld-dynamic/export-dynamic-symbol-list-2.d: Likewise.
+ * testsuite/ld-dynamic/export-dynamic-symbol-list-glob.d: Likewise.
+ * testsuite/ld-dynamic/export-dynamic-symbol.exp: Exclude targets
+ with poor PIE support.
+
+2020-06-04 Alan Modra <amodra@gmail.com>
+
* testsuite/ld-plugin/lto.exp (pr12758.exe): Add NOPIE_LDFLAGS.
* testsuite/ld-unique/unique.exp: Add NOPIE_LDFLAGS to unique
executable and dynamic executable tests.
diff --git a/ld/testsuite/ld-dynamic/export-dynamic-symbol-2.d b/ld/testsuite/ld-dynamic/export-dynamic-symbol-2.d
index d38508a..eaffc3a 100644
--- a/ld/testsuite/ld-dynamic/export-dynamic-symbol-2.d
+++ b/ld/testsuite/ld-dynamic/export-dynamic-symbol-2.d
@@ -2,8 +2,11 @@
#source: export-dynamic-symbol.s
#ld: -pie -u foo --export-dynamic-symbol foo --export-dynamic-symbol=bar tmpdir/libpr25910.a
#nm: -D
+# mips-sgi-irix6 makes foo and bar SHN_MIPS_DATA (SHN_LOPROC+2) due to the
+# testcase carelessly leaving them untyped which mips gas turns into
+# STT_OBJECT type. nm interprets SHN_MIPS_DATA (incorrectly) to be A type.
#...
-[0-9a-f]+ T +bar
-[0-9a-f]+ T +foo
+[0-9a-f]+ [AT] +bar
+[0-9a-f]+ [AT] +foo
#...
diff --git a/ld/testsuite/ld-dynamic/export-dynamic-symbol-glob.d b/ld/testsuite/ld-dynamic/export-dynamic-symbol-glob.d
index f8187be..fad6da9 100644
--- a/ld/testsuite/ld-dynamic/export-dynamic-symbol-glob.d
+++ b/ld/testsuite/ld-dynamic/export-dynamic-symbol-glob.d
@@ -2,7 +2,8 @@
#source: export-dynamic-symbol.s
#ld: -pie -u foo --export-dynamic-symbol "f*" tmpdir/libpr25910.a
#nm: -D
+# See comment in export-dynamic-symbol-2.d for why A is allowed here.
#...
-[0-9a-f]+ T +foo
+[0-9a-f]+ [AT] +foo
#...
diff --git a/ld/testsuite/ld-dynamic/export-dynamic-symbol-list-2.d b/ld/testsuite/ld-dynamic/export-dynamic-symbol-list-2.d
index 337f642..2d110a1 100644
--- a/ld/testsuite/ld-dynamic/export-dynamic-symbol-list-2.d
+++ b/ld/testsuite/ld-dynamic/export-dynamic-symbol-list-2.d
@@ -2,8 +2,9 @@
#source: export-dynamic-symbol.s
#ld: -pie -u foo --export-dynamic-symbol-list foo-bar.list tmpdir/libpr25910.a
#nm: -D
+# See comment in export-dynamic-symbol-2.d for why A is allowed here.
#...
-[0-9a-f]+ T +bar
-[0-9a-f]+ T +foo
+[0-9a-f]+ [AT] +bar
+[0-9a-f]+ [AT] +foo
#...
diff --git a/ld/testsuite/ld-dynamic/export-dynamic-symbol-list-glob.d b/ld/testsuite/ld-dynamic/export-dynamic-symbol-list-glob.d
index 916a22c..2a79d20 100644
--- a/ld/testsuite/ld-dynamic/export-dynamic-symbol-list-glob.d
+++ b/ld/testsuite/ld-dynamic/export-dynamic-symbol-list-glob.d
@@ -2,7 +2,8 @@
#source: export-dynamic-symbol.s
#ld: -pie -u foo --export-dynamic-symbol-list fstar.list tmpdir/libpr25910.a
#nm: -D
+# See comment in export-dynamic-symbol-2.d for why A is allowed here.
#...
-[0-9a-f]+ T +foo
+[0-9a-f]+ [AT] +foo
#...
diff --git a/ld/testsuite/ld-dynamic/export-dynamic-symbol.exp b/ld/testsuite/ld-dynamic/export-dynamic-symbol.exp
index ae53036..44bd762 100644
--- a/ld/testsuite/ld-dynamic/export-dynamic-symbol.exp
+++ b/ld/testsuite/ld-dynamic/export-dynamic-symbol.exp
@@ -23,9 +23,16 @@ if ![is_elf_format] {
return
}
-# Skip targets where -shared is not supported
+# Skip targets where -shared or -pie is not supported
+if { ![check_shared_lib_support] || ![check_pie_support] } {
+ return
+}
-if ![check_shared_lib_support] {
+# Skip targets that have poor PIE support, resulting in failures due to
+# PHDR segment not covered by LOAD segment errors.
+if { ([istarget "bfin-*-*"] && ![istarget "bfin-*-linux*"])
+ || [istarget "mn10300-*-*"]
+ || [istarget "score-*-*"] } {
return
}