tcl global directive outside proc body does nothing (ld)
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / indirect.exp
index fd7d1897bf5a1c9cf5a64a2016ecbd138b6ad203..acda39ef38f7ba2b74242158dd52a28e200b77f6 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for various indirect symbol tests.
-#   Copyright (C) 2012-2017 Free Software Foundation, Inc.
+#   Copyright (C) 2012-2020 Free Software Foundation, Inc.
 #
 # This file is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,7 @@ if ![check_shared_lib_support] {
 }
 
 # Check if compiler works
-if { [which $CC] == 0 } {
+if { ![check_compiler_available] } {
     return
 }
 
@@ -110,9 +110,7 @@ set build_tests {
 
 run_cc_link_tests $build_tests
 
-global ld
-
-set string ": final link failed: Bad value"
+set string ": final link failed: bad value"
 set string1 ": local symbol \`foo\' in tmpdir/indirect1b.o is referenced by DSO"
 
 set testname "Indirect symbol 1a"
@@ -123,13 +121,10 @@ set testname "Indirect symbol 1b"
 set cmd "$ld -e start -o tmpdir/indirect1 tmpdir/indirect1a.o tmpdir/libindirect1c.so tmpdir/indirect1b.o"
 check_link_message "$cmd" [list $string1 $string] "$testname"
 
-set string ": final link failed: Nonrepresentable section on output"
-set string2 ": No symbol version section for versioned symbol \`foo@FOO\'"
+set string2 ": no symbol version section for versioned symbol \`foo@FOO\'"
 set testname "Indirect symbol 2"
 set cmd "$ld -shared  -o tmpdir/indirect2.so tmpdir/indirect2.o"
-check_link_message "$cmd" [list $string2 $string] "$testname"
-
-global NOPIE_CFLAGS NOPIE_LDFLAGS
+check_link_message "$cmd" [list $string2] "$testname"
 
 set run_tests {
     {"Run with libindirect3c.so 1"
This page took 0.025232 seconds and 4 git commands to generate.