aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-07-22 04:44:03 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-07-22 04:44:33 -0700
commit2ceac9a8a5e208d4aa4824b2fb67e83ceaa19fe0 (patch)
treeb2324036b5cf60cd69dc7ff3608c7dcfca7b3dff
parent7d066bc6aa8c4cf04b2b75e3a1a65a3aae791bce (diff)
downloadgdb-users/hjl/gold-test.zip
gdb-users/hjl/gold-test.tar.gz
gdb-users/hjl/gold-test.tar.bz2
Add ld-elfvers/vers-gold.expusers/hjl/gold-test
-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
}