aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-06-18 16:42:23 +0930
committerAlan Modra <amodra@gmail.com>2018-06-18 22:00:32 +0930
commit77236b8349e95c869179b1efa4e6c2ee5c878141 (patch)
treeb697ec192ca4ac488b0343f8824d0f4c657e95fc
parented1299fe460812ad4bbdc2192d0c0cbeba3d6b66 (diff)
downloadgdb-77236b8349e95c869179b1efa4e6c2ee5c878141.zip
gdb-77236b8349e95c869179b1efa4e6c2ee5c878141.tar.gz
gdb-77236b8349e95c869179b1efa4e6c2ee5c878141.tar.bz2
Build ifunc tests when non-native
Plus a number of fixes to the pr23169 tests. * testsuite/lib/ld-lib.exp (check_ifunc_available): Pass without running executable when non-native. (check_ifunc_attribute_available): Likewise. * testsuite/ld-ifunc/pr23169a.rd: Remove extraneous lines. Match st_other strings. Pass when func is an ifunc. * testsuite/ld-ifunc/pr23169b.rd: Remove extraneous lines. Correct reloc regexp. Correct match-anything line. * testsuite/ld-ifunc/pr23169c.rd: Remove extraneous lines. Match st_other strings.
-rw-r--r--ld/ChangeLog12
-rw-r--r--ld/testsuite/ld-ifunc/pr23169a.rd7
-rw-r--r--ld/testsuite/ld-ifunc/pr23169b.rd5
-rw-r--r--ld/testsuite/ld-ifunc/pr23169c.rd7
-rw-r--r--ld/testsuite/lib/ld-lib.exp4
5 files changed, 21 insertions, 14 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 2ec38ac..9519834 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,15 @@
+2018-06-18 Alan Modra <amodra@gmail.com>
+
+ * testsuite/lib/ld-lib.exp (check_ifunc_available): Pass without
+ running executable when non-native.
+ (check_ifunc_attribute_available): Likewise.
+ * testsuite/ld-ifunc/pr23169a.rd: Remove extraneous lines. Match
+ st_other strings. Pass when func is an ifunc.
+ * testsuite/ld-ifunc/pr23169b.rd: Remove extraneous lines. Correct
+ reloc regexp. Correct match-anything line.
+ * testsuite/ld-ifunc/pr23169c.rd: Remove extraneous lines. Match
+ st_other strings.
+
2018-06-14 Alan Modra <amodra@gmail.com>
* testsuite/ld-elf/readelf.exp: Delete DUMP and selection of
diff --git a/ld/testsuite/ld-ifunc/pr23169a.rd b/ld/testsuite/ld-ifunc/pr23169a.rd
index ca04d8f..fcb4fea 100644
--- a/ld/testsuite/ld-ifunc/pr23169a.rd
+++ b/ld/testsuite/ld-ifunc/pr23169a.rd
@@ -1,6 +1,3 @@
-
-Symbol table '\.dynsym' contains [0-9]+ entries:
- +Num: +Value +Size Type +Bind +Vis +Ndx Name
-#...
- +[0-9]+: +[a-f0-9]+ +0 +FUNC +GLOBAL +DEFAULT +[0-9]+ +func
#...
+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +I?FUNC +GLOBAL +DEFAULT.* [0-9]+ +func
+#pass
diff --git a/ld/testsuite/ld-ifunc/pr23169b.rd b/ld/testsuite/ld-ifunc/pr23169b.rd
index d57a793..8f80052 100644
--- a/ld/testsuite/ld-ifunc/pr23169b.rd
+++ b/ld/testsuite/ld-ifunc/pr23169b.rd
@@ -1,3 +1,4 @@
#failif
-[a-f0-9]+ +[0-9a-f]+ +R_.*_* +[a-f0-9]+ +func(| \+ 0)
-...
+#...
+[0-9a-f]+ +[0-9a-f]+ +R_[^ ]+ +[0-9a-f]+ +func(| \+ 0)
+#pass
diff --git a/ld/testsuite/ld-ifunc/pr23169c.rd b/ld/testsuite/ld-ifunc/pr23169c.rd
index 1c4ba8a..ad364d4 100644
--- a/ld/testsuite/ld-ifunc/pr23169c.rd
+++ b/ld/testsuite/ld-ifunc/pr23169c.rd
@@ -1,6 +1,3 @@
-
-Symbol table '\.dynsym' contains [0-9]+ entries:
- +Num: +Value +Size Type +Bind +Vis +Ndx Name
-#...
- +[0-9]+: +[a-f0-9]+ +[0-9]+ +IFUNC +GLOBAL +DEFAULT +[0-9]+ +func
#...
+ +[0-9]+: +[0-9a-f]+ +[0-9]+ +IFUNC +GLOBAL +DEFAULT.* [0-9]+ +func
+#pass
diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp
index 4168933..cfbefe9 100644
--- a/ld/testsuite/lib/ld-lib.exp
+++ b/ld/testsuite/lib/ld-lib.exp
@@ -2137,7 +2137,7 @@ proc check_ifunc_available { } {
set src [remote_download host $src]
}
set ifunc_available_saved [run_host_cmd_yesno "$CC" "$flags $src -o $output"]
- if { $ifunc_available_saved == 1 } {
+ if { [isnative] && $ifunc_available_saved == 1 } {
set ifunc_available_saved [run_host_cmd_yesno "$output" ""]
}
remote_file host delete $src
@@ -2184,7 +2184,7 @@ proc check_ifunc_attribute_available { } {
set src [remote_download host $src]
}
set ifunc_attribute_available_saved [run_host_cmd_yesno "$CC" "$flags $src -o $output"]
- if { $ifunc_attribute_available_saved == 1 } {
+ if { [isnative] && $ifunc_attribute_available_saved == 1 } {
set ifunc_attribute_available_saved [run_host_cmd_yesno "$output" ""]
}
remote_file host delete $src