X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Ftestsuite%2Fld-elf%2Fexclude.exp;h=af57509acd355d67cc764578780cea3a8ec5bdb1;hb=348fe36b1d64f12c60e08f6313520b3191663063;hp=38432b55363e4d17bbacd42c39d33d135c497863;hpb=219d1afa89d0d53ca93a684cac341f16470f3ca0;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/testsuite/ld-elf/exclude.exp b/ld/testsuite/ld-elf/exclude.exp index 38432b5536..af57509acd 100644 --- a/ld/testsuite/ld-elf/exclude.exp +++ b/ld/testsuite/ld-elf/exclude.exp @@ -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