aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ld/testsuite/ld-elfvers/vers-gold.exp24
-rw-r--r--ld/testsuite/ld-elfvers/vers.exp15
2 files changed, 37 insertions, 2 deletions
diff --git a/ld/testsuite/ld-elfvers/vers-gold.exp b/ld/testsuite/ld-elfvers/vers-gold.exp
new file mode 100644
index 0000000..93cd418
--- /dev/null
+++ b/ld/testsuite/ld-elfvers/vers-gold.exp
@@ -0,0 +1,24 @@
+# Expect script for gold-version tests
+# Copyright (C) 2015 Free Software Foundation, Inc.
+#
+# This file is part of the GNU Binutils.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
+# MA 02110-1301, USA.
+#
+
+set test_gold "yes"
+load_lib ../ld-elfvers/vers.exp
+unset test_gold
diff --git a/ld/testsuite/ld-elfvers/vers.exp b/ld/testsuite/ld-elfvers/vers.exp
index 2482809..b1d5ec6 100644
--- a/ld/testsuite/ld-elfvers/vers.exp
+++ b/ld/testsuite/ld-elfvers/vers.exp
@@ -105,6 +105,17 @@ case $target_triplet in {
default { set as_options "" }
}
+global test_gold
+if { [info exists test_gold] && $test_gold == yes } then {
+ if { ![info exists gold] } then {
+ unsupported "gold symbol version tests"
+ return
+ }
+ set linker "$gold"
+} else {
+ set linker "$ld"
+}
+
proc test_ar { test lib object expect } {
global ar
global nm
@@ -502,7 +513,7 @@ proc objdump_versionstuff { objdump object expectfile } {
}
proc build_binary { shared pic test source libname other mapfile verexp versymexp symexp ldargs } {
- global ld
+ global linker
global srcdir
global subdir
global exec_output
@@ -538,7 +549,7 @@ proc build_binary { shared pic test source libname other mapfile verexp versymex
set script_arg "$script $srcdir/$subdir/$mapfile"
}
- if {![ld_simple_link $ld $tmpdir/$libname.so "$shared $tmpdir/$libname.o $other_lib $script_arg $ldargs"]} {
+ if {![ld_simple_link $linker $tmpdir/$libname.so "$shared $tmpdir/$libname.o $other_lib $script_arg $ldargs"]} {
fail "$test"
return
}