Remove perror from ld_assemble, ld_compile and ld_nm
[deliverable/binutils-gdb.git] / ld / testsuite / ld-elf / exclude.exp
index 38432b55363e4d17bbacd42c39d33d135c497863..af57509acd355d67cc764578780cea3a8ec5bdb1 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for --exclude-libs tests
-#   Copyright (C) 2004-2018 Free Software Foundation, Inc.
+#   Copyright (C) 2004-2020 Free Software Foundation, Inc.
 #
 # This file is part of the GNU Binutils.
 #
@@ -39,12 +39,6 @@ if { [istarget "tic6x-*-*"] } {
     set as_opt "-mpic -mpid=near"
 }
 
-global ar
-global as
-global ld
-global nm
-global nm_output
-
 set test1 "ld link shared library"
 set test2 "ld export symbols from archive"
 set test3 "ld link shared library with --exclude-libs"
@@ -81,10 +75,9 @@ if { [ld_link $ld tmpdir/exclude.so "--shared tmpdir/exclude1.o -Ltmpdir -lexclu
     return
 }
 
-if ![ld_nm $nm "-D" tmpdir/exclude.so] {
-    unresolved $test2
-} elseif { [info exists nm_output(exclude_common)]
-           && [info exists nm_output(exclude_sym)] } {
+if { [ld_nm $nm "-D" tmpdir/exclude.so]
+     && [info exists nm_output(exclude_common)]
+     && [info exists nm_output(exclude_sym)] } {
     pass $test2
 } else {
     fail $test2
@@ -98,10 +91,9 @@ if { [ld_link $ld tmpdir/exclude.so "--exclude-libs libexclude --shared tmpdir/e
     fail $test3
 }
 
-if ![ld_nm $nm "-D" tmpdir/exclude.so] {
-    unresolved $test4
-} elseif { ! [info exists nm_output(exclude_common)]
-          &&  ! [info exists nm_output(exclude_sym)] } {
+if { [ld_nm $nm "-D" tmpdir/exclude.so]
+     && ! [info exists nm_output(exclude_common)]
+     &&  ! [info exists nm_output(exclude_sym)] } {
     pass $test4
 } else {
     fail $test4
This page took 0.02601 seconds and 4 git commands to generate.