X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=ld%2Ftestsuite%2Fld-elf%2Fcompress.exp;h=8b55f86ea9a0b580cd6c7940b3dd04e552bfdf73;hb=e2c8dab6ae8654a928ab9364d5090781a4a6f62f;hp=5620f3ca4bfe8764a27debf60df833973b818ae7;hpb=47523653a331d0a04470701338a6ed269cc758f4;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/testsuite/ld-elf/compress.exp b/ld/testsuite/ld-elf/compress.exp index 5620f3ca4b..8b55f86ea9 100644 --- a/ld/testsuite/ld-elf/compress.exp +++ b/ld/testsuite/ld-elf/compress.exp @@ -1,5 +1,5 @@ # Expect script for ELF compressed debug section tests. -# Copyright (C) 2010-2017 Free Software Foundation, Inc. +# Copyright (C) 2010-2020 Free Software Foundation, Inc. # # This file is part of the GNU Binutils. # @@ -32,11 +32,10 @@ if ![check_shared_lib_support] { } # Check if compiler works -if { [which $CC] == 0 } { +if { ![check_compiler_available] } { return } -global as if { ![ld_assemble $as "--compress-debug-sections $srcdir/$subdir/empty.s" tmpdir/empty.o ] } { fail "linker compressed debug sections" } @@ -124,8 +123,6 @@ if { [catch {exec cmp tmpdir/libfoo.so tmpdir/libfoozlib.so}] } then { pass "$test_name" } -global READELF - set test_name "Link -r with zlib compressed debug output" set test zlibbegin send_log "$READELF -S -W tmpdir/$test.o > tmpdir/$test.out\n" @@ -168,19 +165,19 @@ if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rt] } then { pass "$test_name" } -set test_name "Link with zlib compressed debug output" +set test_name "Link with zlib compressed debug output 1" set test normal send_log "$READELF -w tmpdir/$test > tmpdir/$test.out\n" -set got [remote_exec host "$READELF -w tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"] +set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test > tmpdir/$test.out"]] "" "/dev/null"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" unresolved "$test_name" } -set test_name "Link with zlib compressed debug output" +set test_name "Link with zlib compressed debug output 2" set test zlibnormal send_log "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out\n" -set got [remote_exec host "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\"" "" "/dev/null" "tmpdir/$test.out"] +set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out"]] "" "/dev/null"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" unresolved "$test_name" @@ -191,6 +188,7 @@ if { [catch {exec cmp tmpdir/normal.out tmpdir/$test.out}] } then { } else { pass "$test_name" } +set test_name "Link with zlib compressed debug output 3" send_log "$READELF -S -W tmpdir/$test' > tmpdir/$test.out\n" set got [remote_exec host "$READELF -S -W tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { @@ -203,10 +201,10 @@ if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rS] } then { pass "$test_name" } -set test_name "Link with zlib-gnu compressed debug output" +set test_name "Link with zlib-gnu compressed debug output 1" set test gnunormal send_log "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out\n" -set got [remote_exec host "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\"" "" "/dev/null" "tmpdir/$test.out"] +set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out"]] "" "/dev/null"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" unresolved "$test_name" @@ -217,6 +215,7 @@ if { [catch {exec cmp tmpdir/normal.out tmpdir/$test.out}] } then { } else { pass "$test_name" } +set test_name "Link with zlib-gnu compressed debug output 2" send_log "$READELF -S -W tmpdir/$test' > tmpdir/$test.out\n" set got [remote_exec host "$READELF -S -W tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { @@ -230,9 +229,9 @@ if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rS] } then { } set test gabinormal -set test_name "Link with zlib-gabi compressed debug output" +set test_name "Link with zlib-gabi compressed debug output 1" send_log "$READELF -w tmpdir/$test > tmpdir/$test.out\n" -set got [remote_exec host "$READELF -w tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"] +set got [remote_exec host [concat sh -c [list "$READELF -w tmpdir/$test > tmpdir/$test.out"]] "" "/dev/null"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" unresolved "$test_name" @@ -243,6 +242,7 @@ if { [catch {exec cmp tmpdir/normal.out tmpdir/$test.out}] } then { } else { pass "$test_name" } +set test_name "Link with zlib-gabi compressed debug output 2" send_log "$READELF -t -W tmpdir/$test > tmpdir/$test.out\n" set got [remote_exec host "$READELF -t -W tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"] if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {