]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - ld/testsuite/ld-elf/compress.exp
Update year range in copyright notice of binutils files
[thirdparty/binutils-gdb.git] / ld / testsuite / ld-elf / compress.exp
index 0020e9941fbd6963224668616352cca1abc9dbd8..6e66c9b9bcecbc1252c975454f8c686f0fcb3764 100644 (file)
@@ -1,5 +1,5 @@
 # Expect script for ELF compressed debug section tests.
-#   Copyright (C) 2010-2018 Free Software Foundation, Inc.
+#   Copyright (C) 2010-2021 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,7 +165,7 @@ 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 [concat sh -c [list "$READELF -w tmpdir/$test > tmpdir/$test.out"]] "" "/dev/null"]
@@ -177,7 +174,7 @@ if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
     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 [concat sh -c [list "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out"]] "" "/dev/null"]
@@ -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,7 +201,7 @@ 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 [concat sh -c [list "$READELF -w tmpdir/$test | sed -e \"s/.zdebug_/.debug_/\" > tmpdir/$test.out"]] "" "/dev/null"]
@@ -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,7 +229,7 @@ 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 [concat sh -c [list "$READELF -w tmpdir/$test > tmpdir/$test.out"]] "" "/dev/null"]
 if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
@@ -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 {