+2021-02-14 Alan Modra <amodra@gmail.com>
+
+ * testsuite/ld-cdtest/cdtest.exp,
+ * testsuite/ld-checks/checks.exp,
+ * testsuite/ld-elf/binutils.exp,
+ * testsuite/ld-elf/compress.exp,
+ * testsuite/ld-elf/dwarf.exp,
+ * testsuite/ld-elf/exclude.exp,
+ * testsuite/ld-elf/frame.exp,
+ * testsuite/ld-elf/indirect.exp,
+ * testsuite/ld-elf/linux-x86.exp,
+ * testsuite/ld-elf/sec-to-seg.exp,
+ * testsuite/ld-elf/tls_common.exp,
+ * testsuite/ld-elfcomm/elfcomm.exp,
+ * testsuite/ld-elfvers/vers.exp,
+ * testsuite/ld-elfvsb/elfvsb.exp,
+ * testsuite/ld-elfweak/elfweak.exp,
+ * testsuite/ld-ifunc/binutils.exp,
+ * testsuite/ld-mips-elf/mips-elf-flags.exp,
+ * testsuite/ld-misc/defsym.exp,
+ * testsuite/ld-mn10300/mn10300.exp,
+ * testsuite/ld-plugin/lto.exp,
+ * testsuite/ld-plugin/plugin.exp,
+ * testsuite/ld-scripts/align.exp,
+ * testsuite/ld-scripts/assert.exp,
+ * testsuite/ld-scripts/crossref.exp,
+ * testsuite/ld-scripts/defined.exp,
+ * testsuite/ld-scripts/extern.exp,
+ * testsuite/ld-scripts/log2.exp,
+ * testsuite/ld-scripts/map-address.exp,
+ * testsuite/ld-scripts/phdrs.exp,
+ * testsuite/ld-scripts/phdrs2.exp,
+ * testsuite/ld-scripts/script.exp,
+ * testsuite/ld-scripts/section-flags.exp,
+ * testsuite/ld-scripts/sizeof.exp,
+ * testsuite/ld-scripts/weak.exp,
+ * testsuite/ld-selective/selective.exp,
+ * testsuite/ld-sh/sh.exp,
+ * testsuite/ld-shared/shared.exp,
+ * testsuite/ld-srec/srec.exp,
+ * testsuite/ld-tic6x/tic6x.exp,
+ * testsuite/ld-undefined/undefined.exp,
+ * testsuite/ld-undefined/weak-undef.exp,
+ * testsuite/lib/ld-lib.exp: Don't use unresolved except after
+ perror. Instead report "unsupported" or "fail".
+
2021-02-12 Nick Clifton <nickc@redhat.com>
* testsuite/ld-elf/sec64k.exp: Stop readelf from automatically
if { ![ld_compile "$CXX $CXXFLAGS -fno-exceptions" $srcdir/$subdir/cdtest-foo.cc tmpdir/cdtest-foo.o]
|| ![ld_compile "$CXX $CXXFLAGS -fno-exceptions" $srcdir/$subdir/cdtest-bar.cc tmpdir/cdtest-bar.o]
|| ![ld_compile "$CXX $CXXFLAGS -fno-exceptions" $srcdir/$subdir/cdtest-main.cc tmpdir/cdtest-main.o] } {
- unresolved $test1
- unresolved $test2
+ unsupported $test1
+ unsupported $test2
return
}
set ldflags "$LDFLAGS --check-sections -e foo"
if { ![ld_assemble $as $srcdir/$subdir/asm.s tmpdir/asm.o]} {
- unresolved $test
+ unsupported $test
return
}
}
if { ![ld_assemble $as $srcdir/$subdir/$test.s tmpdir/$test.o ] } {
- unresolved "$test_name"
+ unsupported "$test_name"
return
}
if { ![ld_link $ld tmpdir/$test "$ld_options -z stack-size=0 tmpdir/$test.o"] } {
if { [string match "*not supported*" $link_output]
|| [string match "*unrecognized option*" $link_output]
- || [string match "*-z relro ignored*" $link_output] } {
+ || [string match "*-z * ignored*" $link_output] } {
unsupported "$ld_options is not supported by this target"
} else {
- unresolved "$test_name"
+ fail "$test_name"
}
return
}
set got [remote_exec host "$READELF $readelf_options --wide tmpdir/$test" "" "/dev/null" "tmpdir/$test.exp"]
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
return
}
set got [remote_exec host "$READELF $readelf_options --wide tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"]
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
return
}
set got [remote_exec host "$READELF -S -W tmpdir/$test.o" "" "/dev/null" "tmpdir/$test.out"]
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
}
if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rS] } then {
fail "$test_name"
set got [remote_exec host "$READELF -S -W tmpdir/$test.o" "" "/dev/null" "tmpdir/$test.out"]
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
}
if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rS] } then {
fail "$test_name"
set got [remote_exec host "$READELF -t -W tmpdir/$test.o" "" "/dev/null" "tmpdir/$test.out"]
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
}
if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rt] } then {
fail "$test_name"
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"
+ fail "$test_name"
}
set test_name "Link with zlib compressed debug output 2"
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"
+ fail "$test_name"
}
if { [catch {exec cmp tmpdir/normal.out tmpdir/$test.out}] } then {
send_log "tmpdir/normal.out tmpdir/$test.out differ.\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 {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
}
if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rS] } then {
fail "$test_name"
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"
+ fail "$test_name"
}
if { [catch {exec cmp tmpdir/normal.out tmpdir/$test.out}] } then {
send_log "tmpdir/normal.out tmpdir/$test.out differ.\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 {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
}
if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rS] } then {
fail "$test_name"
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"
+ fail "$test_name"
}
if { [catch {exec cmp tmpdir/normal.out tmpdir/$test.out}] } then {
send_log "tmpdir/normal.out tmpdir/$test.out differ.\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 {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
}
if { [regexp_diff tmpdir/$test.out $srcdir/$subdir/$test.rt] } then {
fail "$test_name"
set prog $strip
if ![ld_link $ld tmpdir/$test "-shared tmpdir/dwarf1.o"] {
- unresolved "$test_name"
+ fail "$test_name"
return
}
catch "exec $NM -D tmpdir/$test > tmpdir/$test.exp" got
if ![string match "" $got] then {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
return
}
catch "exec $NM -D tmpdir/$test > tmpdir/$test.out" got
if ![string match "" $got] then {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
return
}
if { ![ld_assemble_flags $as $as_opt $srcdir/$subdir/exclude1.s tmpdir/exclude1.o ]
|| ![ld_assemble_flags $as $as_opt $srcdir/$subdir/exclude2.s tmpdir/exclude2.o] } {
- unresolved $test1
+ unsupported $test1
return
}
remote_file host delete "tmpdir/libexclude.a"
set catch_output [run_host_cmd "$ar" "cq tmpdir/libexclude.a tmpdir/exclude2.o"]
if {![string match "" $catch_output]} {
- unresolved $test1
+ fail $test1
return
}
if { ![ld_assemble_flags $as $as_opt $srcdir/$subdir/tbss.s tmpdir/tbss.o ]
|| ![ld_assemble_flags $as $as_opt $srcdir/$subdir/frame.s tmpdir/frame.o] } {
- unresolved "$test1"
+ unsupported "$test1"
return
}
}
if ![ld_assemble_flags $as $as_opt $srcdir/$subdir/table.s tmpdir/table.o ] {
- unresolved "$test2"
+ unsupported "$test2"
return
}
|| ![ld_compile "$cc_cmd -fPIC" $srcdir/$subdir/pr19553c.c tmpdir/pr19553c.o]
|| ![ld_compile "$cc_cmd -fPIC" $srcdir/$subdir/pr19553b.c tmpdir/pr19553b.o]
|| ![ld_compile $cc_cmd $srcdir/$subdir/pr19553a.c tmpdir/pr19553a.o] } {
- unresolved "Indirect symbol tests"
+ unsupported "Indirect symbol tests"
return
}
set got [remote_exec host "$ELFEDIT $options tmpdir/$test" "" "/dev/null"]
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
}
send_log "$READELF -n $options tmpdir/$test > tmpdir/$output.out\n"
set got [remote_exec host "$READELF -n tmpdir/$test" "" "/dev/null" "tmpdir/$output.out"]
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
}
if { [regexp_diff tmpdir/$output.out $srcdir/$subdir/$output.rd] } then {
fail "$test_name"
if { ! [ld_assemble $as $srcdir/$subdir/sec-to-seg1.s tmpdir/sec-to-seg1.o]
|| ! [ld_assemble $as $srcdir/$subdir/sec-to-seg2.s tmpdir/sec-to-seg2.o]} then {
- unresolved $testname
+ unsupported $testname
return
}
if { ![ld_assemble $as "--elf-stt-common=no $srcdir/$subdir/tls_common.s" tmpdir/tls_commona.o]
|| ![ld_assemble $as "--elf-stt-common=yes $srcdir/$subdir/tls_common.s" tmpdir/tls_commonb.o] } {
- unresolved "tls_common"
+ unsupported "tls_common"
return
}
if { [string match "*not supported*" $link_output]
|| [string match "*unrecognized option*" $link_output] } {
unsupported "$ld_options is not supported by this target"
- } elseif { [string match "*warning*alignment*of common symbol*" $link_output] } {
- fail "tls_common"
} else {
- unresolved "tls_common"
+ fail "tls_common"
}
return
}
if { [string match "*not supported*" $link_output]
|| [string match "*unrecognized option*" $link_output] } {
unsupported "$ld_options is not supported by this target"
- } elseif { [string match "*warning*alignment*of common symbol*" $link_output] } {
- fail "tls_common"
} else {
- unresolved "tls_common"
+ fail "tls_common"
}
return
}
}
if { ![ld_assemble $as $srcdir/$subdir/sort-common.s tmpdir/sort-common.o] } {
- unresolved "$test"
+ unsupported "$test"
return 0
}
set options "$options tmpdir/common1c.o"
if { ! [ld_link $ld tmpdir/common.exe $options] } {
- unresolved $testname
+ fail $testname
return 0
}
if { ![ld_compile "$CC $CFLAGS -fcommon $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/common1a.c tmpdir/common1a.o]
|| ![ld_compile "$CC $CFLAGS -fcommon $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/common1b.c tmpdir/common1b.o]
|| ![ld_compile "$CC $CFLAGS $NOSANITIZE_CFLAGS $NOLTO_CFLAGS -Wa,--elf-stt-common=yes -fcommon" $srcdir/$subdir/common1b.c tmpdir/common1c.o] } {
- unresolved $test1
- unresolved $test1
+ unsupported $test1
return
}
set options "-r tmpdir/common1a.o tmpdir/common1b.o"
if { [ld_link $ld tmpdir/common1.o $options] } {
- unresolved $test1w1
+ fail $test1w1
return
}
set options "-r tmpdir/common1b.o tmpdir/common1a.o"
if { [ld_link $ld tmpdir/common1.o $options] } {
- unresolved $test1w2
+ fail $test1w2
return
}
set exec_output [prune_warnings $exec_output]
if ![string match "" $exec_output] {
verbose -log "$exec_output"
- unresolved "$test"
+ fail "$test"
return
}
global NOLTO_CFLAGS
if ![ld_compile "$CC -S $pic $CFLAGS $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/$source $tmpdir/$libname.s] {
- unresolved "$test"
+ unsupported "$test"
return
}
if ![ld_assemble $as "$as_options $tmpdir/$libname.s" $tmpdir/$libname.o ] {
- unresolved "$test"
+ unsupported "$test"
return
}
}
if ![ld_compile "$CC -S $flag $CFLAGS" $srcdir/$subdir/$source $tmpdir/$execname.s] {
- unresolved "$test"
+ unsupported "$test"
return
}
if ![ld_assemble $as "$as_options $tmpdir/$execname.s" $tmpdir/$execname.o ] {
- unresolved "$test"
+ unsupported "$test"
return
}
global NOLTO_CFLAGS
if ![ld_compile "$CC -S $flag $CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/$source $tmpdir/$execname.s] {
- unresolved "$test"
+ unsupported "$test"
return
}
append cc_cmd " $NOSANITIZE_CFLAGS $NOLTO_CFLAGS"
if ![ld_compile $cc_cmd $srcdir/$subdir/$source $tmpdir/$execname.s] {
- unresolved "$test"
+ unsupported "$test"
return
}
if ![ld_assemble $as "$as_options $tmpdir/$execname.s" $tmpdir/$execname.o ] {
- unresolved "$test"
+ unsupported "$test"
return
}
# Compile the main program. Make sure that PLT is used since PLT
# is expected.
if ![ld_compile "$CC -g $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/main.c $tmpdir/mainnp.o] {
- unresolved "visibility ($visibility) (non PIC)"
- unresolved "visibility ($visibility)"
+ unsupported "visibility ($visibility) (non PIC)"
+ unsupported "visibility ($visibility)"
} else {
# The shared library is composed of two files. First compile them
# without using -fpic. That should work on an ELF system,
# results. Make sure that PLT is used since PLT is expected.
if { ![ld_compile "$CC -g $NOPIE_CFLAGS $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o]
|| ![ld_compile "$CC -g $NOPIE_CFLAGS $PLT_CFLAGS $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } {
- unresolved "visibility ($visibility) (non PIC)"
+ unsupported "visibility ($visibility) (non PIC)"
} else {
# SunOS non PIC shared libraries don't permit some cases of
# overriding.
if { ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
|| ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
- unresolved "visibility ($visibility)"
+ unsupported "visibility ($visibility)"
} else {
if { [ string match $visibility "protected" ]
|| [ string match $visibility "protected_undef_def" ] } {
} else {
# Now do the same tests again, but this time compile main.c PIC.
if ![ld_compile "$CC -g $CFLAGS $SHCFLAG $VSBCFLAG $NOSANITIZE_CFLAGS $NOLTO_CFLAGS -DSHARED $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] {
- unresolved "visibility ($visibility) (PIC main, non PIC so)"
- unresolved "visibility ($visibility) (PIC main)"
+ unsupported "visibility ($visibility) (PIC main, non PIC so)"
+ unsupported "visibility ($visibility) (PIC main)"
} else {
if { [ remote_file host exists $tmpdir/sh1np.o ]
&& [ remote_file host exists $tmpdir/sh2np.o ] } {
visibility_test $visibility vmpnp "visibility ($visibility) (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o elfvsb
} else {
- unresolved "visibility (PIC main, non PIC so)"
+ unsupported "visibility (PIC main, non PIC so)"
}
if { [ remote_file host exists $tmpdir/sh1p.o ]
}
visibility_test $visibility vmpp "visibility ($visibility) (PIC main)" mainp.o sh1p.o sh2p.o elfvsb
} else {
- unresolved "visibility ($visibility) (PIC main)"
+ unsupported "visibility ($visibility) (PIC main)"
}
}}
}
visibility_run normal
if { ![ld_compile "$CC -g $CFLAGS $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/common.c tmpdir/common.o] } {
- unresolved "common hidden symbol"
+ unsupported "common hidden symbol"
} else {
if ![ld_link $ld tmpdir/common "tmpdir/common.o"] {
fail "common hidden symbol"
}
if { ![ld_compile "$CC -g $CFLAGS $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" $srcdir/$subdir/test.c tmpdir/test.o] } {
- unresolved "weak hidden symbol"
+ unsupported "weak hidden symbol"
} else {
if { ![ld_compile "$CC -g $CFLAGS $NOSANITIZE_CFLAGS $NOLTO_CFLAGS -DSHARED $picflag" $srcdir/$subdir/sh3.c tmpdir/sh3.o] } {
- unresolved "weak hidden symbol"
+ unsupported "weak hidden symbol"
} else {
if ![ld_link $ld tmpdir/sh3.so "-shared tmpdir/sh3.o"] {
fail "weak hidden symbol"
|| ![ld_compile "$cc_cmd $CFLAGS $picflag" $srcdir/$subdir/bar1b.c $tmpdir/bar1b.o]
|| ![ld_compile "$cc_cmd $CFLAGS $picflag" $srcdir/$subdir/bar1c.c $tmpdir/bar1c.o]
|| ![ld_compile "$cc_cmd $CFLAGS $picflag" $srcdir/$subdir/main1.c $tmpdir/main1.o]} then {
- unresolved "ELF weak"
+ unsupported "ELF weak"
} elseif {![ld_link $cc_cmd $tmpdir/libfoo1a.so "$shared $tmpdir/foo1a.o"]
|| ![ld_link $cc_cmd $tmpdir/libfoo1b.so "$shared $tmpdir/foo1b.o"]
|| ![ld_link $cc_cmd $tmpdir/libbar1a.so "$shared $tmpdir/bar1a.o $tmpdir/libfoo1a.so"]} then {
|| ![ld_compile "$cc_cmd $CFLAGS $picflag" $srcdir/$subdir/size_bar.c $tmpdir/size_bar_s.o]
|| ![ld_compile "$cc_cmd $CFLAGS $picflag -DSIZE_BIG" $srcdir/$subdir/size_bar.c $tmpdir/size_bar.o]
|| ![ld_compile "$cc_cmd $CFLAGS" $srcdir/$subdir/size_main.c $tmpdir/size_main.o]} then {
- unresolved "ELF weak (size)"
+ unsupported "ELF weak (size)"
} else {
build_lib "ELF DSO small bar (size)" libsize_bar_s "size_bar_s.o" ""
build_lib "ELF DSO foo with small bar (size)" libsize_foo "size_foo.o libsize_bar_s.so" ""
|| ![ld_compile "$cc_cmd $CFLAGS" $srcdir/$subdir/aliasmain.c $tmpdir/aliasmain.o]
|| ![ld_compile "$cc_cmd $CFLAGS" $srcdir/$subdir/weakref1.c $tmpdir/weakref1.o]
|| ![ld_compile "$cc_cmd $CFLAGS" $srcdir/$subdir/weakref2.c $tmpdir/weakref2.o]} then {
- unresolved "ELF weak (alias)"
+ unsupported "ELF weak (alias)"
} else {
build_exec "ELF weak (alias)" alias "aliasmain.o weakref1.o weakref2.o alias.so" "-Wl,-rpath=.,--no-as-needed" alias "" ""
}
set test_name "$prog_name $ld_options ($test)"
if { ![ld_assemble $as $srcdir/$subdir/$test.s tmpdir/$test.o ] } {
- unresolved "$test_name"
+ unsupported "$test_name"
return
}
|| [string match "*unrecognized option*" $link_output] } {
unsupported "$ld_options is not supported by this target"
} else {
- unresolved "$test_name"
+ fail "$test_name"
}
return
}
set got [remote_exec host "$READELF -l --wide tmpdir/$test" "" "/dev/null" "tmpdir/$test.exp"]
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
return
}
set got [remote_exec host "$READELF -l --wide tmpdir/$test" "" "/dev/null" "tmpdir/$test.out"]
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
return
}
set cmdret [lindex $cmdret 0]
if {$cmdret != 0 \
|| ![regexp "Flags: *(\[^\n\r\]*)" $output full gotflags]} {
- unresolved $testname
+ fail $testname
} else {
set failed 0
#
if ![ld_assemble $as $srcdir/$subdir/start.s tmpdir/start.o] {
- unresolved "Build start.o"
+ unsupported "Build start.o"
return
}
if ![ld_assemble $as $srcdir/$subdir/foo.s tmpdir/foo.o] {
- unresolved "Build foo.o"
+ unsupported "Build foo.o"
return
}
if { ![ar_simple_create $ar "" tmpdir/libfoo.a tmpdir/foo.o] } {
- unresolved "Build libfoo.a"
+ fail "Build libfoo.a"
return
}
}
if { ![ld_compile "$CC -mrelax -fPIC" $srcdir/$subdir/i126256-1.c $tmpdir/i126256-1.o] } {
- unresolved $testname
- return
+ unsupported $testname
+ return
}
if { ![ld_compile "$CC -mrelax -fPIC" $srcdir/$subdir/i126256-2.c $tmpdir/i126256-2.o] } {
- unresolved $testname
- return
+ unsupported $testname
+ return
}
if { ![ld_link $ld $tmpdir/i126256-1.so "-shared $tmpdir/i126256-1.o -e 0"]} {
- unresolved $testname
- return
+ fail $testname
+ return
}
if { ![ld_link $ld $tmpdir/i126256-2.so "--relax -shared $tmpdir/i126256-2.o $tmpdir/i126256-1.so -e 0"]} {
- fail $testname
- return
+ fail $testname
+ return
}
pass $testname
remote_file host delete "tmpdir/liblto-11.a"
set catch_output [run_host_cmd "$ar" "rc $plug_opt tmpdir/liblto-11.a tmpdir/lto-11a.o tmpdir/lto-11b.o tmpdir/lto-11c.o"]
if {![string match "" $catch_output]} {
- unresolved $testname
+ fail $testname
restore_notify
return
}
# And a compiler to be available.
set can_compile 1
-set failure_kind "unresolved"
if { ![check_compiler_available] } {
# Don't fail immediately,
set can_compile 0
- set failure_kind "unsupported"
}
pass "plugin API enabled"
if { !$can_compile || $failed_compile } {
foreach testitem $plugin_tests {
- $failure_kind [lindex $testitem 0]
+ unsupported [lindex $testitem 0]
}
if { [is_elf_format] } {
foreach testitem $plugin_extra_elf_tests {
- $failure_kind [lindex $testitem 0]
+ unsupported [lindex $testitem 0]
}
}
set CFLAGS "$old_CFLAGS"
if {![ar_simple_create $ar "" "tmpdir/libtext.a" "tmpdir/text.o"] || \
![ar_simple_create $ar "" "tmpdir/libempty.a" ""]} {
foreach testitem $plugin_lib_tests {
- unresolved [lindex $testitem 0]
+ unsupported [lindex $testitem 0]
}
} else {
run_ld_link_tests $plugin_lib_tests
}
} else {
foreach testitem $plugin_src_tests {
- unresolved [lindex $testitem 0]
+ unsupported [lindex $testitem 0]
}
}
] \
]
} else {
- unresolved "PR ld/20070"
+ unsupported "PR ld/20070"
}
set CFLAGS "$old_CFLAGS"
set testname "align1"
if ![ld_assemble $as $srcdir/$subdir/align.s tmpdir/align.o] {
- unresolved $testname
+ unsupported $testname
return
}
set testname "ASSERT"
if ![ld_assemble $as $srcdir/$subdir/assert.s tmpdir/assert.o] {
- unresolved $testname
+ unsupported $testname
return
}
if { ![ld_compile "$CC $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" "$srcdir/$subdir/cross1.c" tmpdir/cross1.o] \
|| ![ld_compile "$CC $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" "$srcdir/$subdir/cross2.c" tmpdir/cross2.o] } {
- unresolved $test1
- unresolved $test2
+ unsupported $test1
+ unsupported $test2
set CFLAGS "$old_CFLAGS"
set CC "$old_CC"
return
# Check cross references within a single object.
if { ![ld_compile "$CC $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" "$srcdir/$subdir/cross3.c" tmpdir/cross3.o] } {
- unresolved $test2
+ unsupported $test2
set CFLAGS "$old_CFLAGS"
set CC "$old_CC"
return
# Check cross references for ld -r
if { ![ld_compile "$CC $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" "$srcdir/$subdir/cross4.c" tmpdir/cross4.o] } {
- unresolved $test3
+ unsupported $test3
set CFLAGS "$old_CFLAGS"
set CC "$old_CC"
return
}
if ![ld_relocate $ld tmpdir/cross3-partial.o "tmpdir/cross1.o tmpdir/cross4.o"] {
- unresolved $test3
+ fail $test3
set CFLAGS "$old_CFLAGS"
set CC "$old_CC"
return
set prms_id 5699
if ![ld_assemble $as $srcdir/$subdir/defined.s tmpdir/def.o] {
- unresolved $testname
+ unsupported $testname
return
}
set testname "EXTERN"
if ![ld_assemble $as $srcdir/$subdir/extern.s tmpdir/extern.o] {
- unresolved $testname
+ unsupported $testname
return
}
set testname "binary logarithm"
if {![ld_assemble $as $srcdir/$subdir/log2.s tmpdir/log2.o]} {
- unresolved $testname
+ unsupported $testname
return
}
# The source file doesn't matter. Pinch one from the sizeof test.
if {![ld_assemble $as $srcdir/$subdir/sizeof.s tmpdir/map-address.o]} {
- unresolved $testname
+ unsupported $testname
return
}
}
if ![ld_assemble $as $srcdir/$subdir/phdrs.s tmpdir/phdrs.o] {
- unresolved $testname
+ unsupported $testname
return
}
if ![ld_link $ld tmpdir/phdrs $ldopt] {
fail $testname
} else {
- if {![is_remote host] && [which $objdump] == 0} {
- unresolved $testname
- return
- }
set exec_output [run_host_cmd "$objdump" "--private-headers tmpdir/phdrs"]
set exec_output [prune_warnings $exec_output]
verbose -log $exec_output
}
if ![ld_assemble $as $srcdir/$subdir/phdrs2.s tmpdir/phdrs2.o] {
- unresolved $testname
+ unsupported $testname
return
}
if ![ld_link $ld tmpdir/phdrs2 $ldopt] {
fail $testname
} else {
- if {![is_remote host] && [which $objdump] == 0} {
- unresolved $testname
- return
- }
-
set exec_output [run_host_cmd "$objdump" "--private-headers tmpdir/phdrs2"]
set exec_output [prune_warnings $exec_output]
verbose -log $exec_output
set testname "script"
if ![ld_assemble $as $srcdir/$subdir/script.s tmpdir/script.o] {
- unresolved $testname
+ unsupported $testname
return
}
foreach test {"section-flags-1" "section-flags-2"} {
if ![ld_assemble $as $srcdir/$subdir/$test.s tmpdir/$test.o] {
- unresolved $test
+ unsupported $test
} else {
if ![ld_link $ldcmd tmpdir/$test \
"-T $srcdir/$subdir/$test.t tmpdir/$test.o"] {
set testname "SIZEOF"
if ![ld_assemble $as $srcdir/$subdir/sizeof.s tmpdir/sizeof.o] {
- unresolved $testname
+ unsupported $testname
return
}
if {! [ld_assemble $as $srcdir/$subdir/weak1.s tmpdir/weak1.o]
|| ! [ld_assemble $as $srcdir/$subdir/weak2.s tmpdir/weak2.o]} then {
# It's OK if .weak doesn't work on this target.
- unresolved $testname
+ unsupported $testname
return
}
if {! [ld_link $ld tmpdir/weak "$flags -T $srcdir/$subdir/weak.t tmpdir/weak1.o tmpdir/weak2.o"] } then {
fail $testname
} else {
- if {![is_remote host] && [which $objdump] == 0} then {
- unresolved $testname
- set LDFLAGS "$saved_LDFLAGS"
- return
- }
-
set exec_output [run_host_cmd "$objdump" "-s tmpdir/weak"]
set exec_output [prune_warnings $exec_output]
verbose -log $exec_output
# tests. It might have been a buglet originally; now I think better
# leave as is.
if { ![ld_compile "$compiler $testflags" $srcdir/$subdir/$testfile $objfile] } {
- unresolved $testname
+ unsupported $testname
continue
}
set testsimple "SH simple relaxing"
if { ![is_elf_format] } {
- unresolved $testsimple
+ unsupported $testsimple
} elseif { ![ld_assemble $as "-relax $srcdir/$subdir/sh1.s" tmpdir/sh1.o] } {
fail $testsimple
} elseif { ![ld_link $ld tmpdir/sh1 "-relax tmpdir/sh1.o"] } {
set testsrec "SH relaxing to S-records"
if { ![remote_file host exists tmpdir/sh1] } {
- unresolved $testsrec
+ unsupported $testsrec
} else {
if { [istarget sh*-linux-*] || [istarget sh-*-vxworks] } {
# On these "non-embedded" targets, the default ELF and srec start
if ![string match "" $exec_output] {
send_log "$exec_output\n"
verbose "$exec_output"
- unresolved $testsrec
+ fail $testsrec
} else {
send_log "$objcopy -O srec tmpdir/sh1 tmpdir/sh1.s1\n"
verbose "$objcopy -O srec tmpdir/sh1 tmpdir/sh1.s1"
if ![string match "" $exec_output] {
send_log "$exec_output\n"
verbose "$exec_output"
- unresolved $testsrec
+ fail $testsrec
} else {
send_log "cmp tmpdir/sh1.s1 tmpdir/sh1.s2\n"
verbose "cmp tmpdir/sh1.s1 tmpdir/sh1.s2"
set testadjsw8 "SH switch8 adjustment after relax"
if { ![is_elf_format] } {
- unresolved $testadjsw8
+ unsupported $testadjsw8
} elseif { ![ld_assemble $as "-relax $srcdir/$subdir/adjsw8.s" tmpdir/adjsw8.o] } {
fail $testadjsw8
} elseif { ![ld_link $ld tmpdir/adjsw8 "-relax tmpdir/adjsw8.o"] } {
if {![ld_assemble $as "-relax tmpdir/start.s" tmpdir/start.o] \
|| ![ld_compile $CC "-O -mrelax -foptimize-sibling-calls $srcdir/$subdir/sh2.c" tmpdir/sh2.o]} {
- unresolved $testlink
- unresolved $testjsr
- unresolved $testrun
+ unsupported $testlink
+ unsupported $testjsr
+ unsupported $testrun
return
}
if ![ld_link $ld tmpdir/sh2 "-relax tmpdir/start.o tmpdir/sh2.o"] {
fail $testlink
- unresolved $testjsr
- unresolved $testrun
+ unsupported $testjsr
+ unsupported $testrun
return
}
# Compile the main program.
if ![ld_compile "$CC $CFLAGS $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] {
- unresolved "shared (non PIC)"
- unresolved "shared"
+ unsupported "shared (non PIC)"
+ unsupported "shared"
} else {
# The shared library is composed of two files. First compile them
# without using -fpic. That should work on an ELF system,
global PLT_CFLAGS NOPIE_CFLAGS
if { ![ld_compile "$CC $PLT_CFLAGS $NOPIE_CFLAGS $CFLAGS $SHCFLAG" $srcdir/$subdir/sh1.c $tmpdir/sh1np.o]
|| ![ld_compile "$CC $PLT_CFLAGS $CFLAGS $SHCFLAG" $srcdir/$subdir/sh2.c $tmpdir/sh2np.o] } {
- unresolved "shared (non PIC)"
+ unsupported "shared (non PIC)"
} else { if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
shared_test shnp "shared (nonPIC)" mainnp.o sh1np.o sh2np.o xcoff
} else {
if { ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh1.c $tmpdir/sh1p.o]
|| ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/sh2.c $tmpdir/sh2p.o] } {
- unresolved "shared"
+ unsupported "shared"
} else {
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
shared_test shp "shared" mainnp.o sh1p.o sh2p.o xcoff
# Now do the same tests again, but this time compile main.c PIC.
if ![ld_compile "$CC $CFLAGS $SHCFLAG $picflag" $srcdir/$subdir/main.c $tmpdir/mainp.o] {
- unresolved "shared (PIC main, non PIC so)"
- unresolved "shared (PIC main)"
+ unsupported "shared (PIC main, non PIC so)"
+ unsupported "shared (PIC main)"
} else {
if { [file exists $tmpdir/sh1np.o ] && [ file exists $tmpdir/sh2np.o ] } {
if { [istarget rs6000*-*-aix*] || [istarget powerpc*-*-aix*] } {
shared_test shmpnp "shared (PIC main, non PIC so)" mainp.o sh1np.o sh2np.o shared
}
} else {
- unresolved "shared (PIC main, non PIC so)"
+ unsupported "shared (PIC main, non PIC so)"
}
if { [file exists $tmpdir/sh1p.o ] && [ file exists $tmpdir/sh2p.o ] } {
shared_test shmpp "shared (PIC main)" mainp.o sh1p.o sh2p.o shared
}
} else {
- unresolved "shared (PIC main)"
+ unsupported "shared (PIC main)"
}
}
if ![string match "" $exec_output] {
send_log "$exec_output\n"
verbose "$exec_output"
- unresolved $test
+ fail $test
return
}
if { ![ld_compile $CC $srcdir/$subdir/sr1.c tmpdir/sr1.o] \
|| ![ld_compile $CC $srcdir/$subdir/sr2.c tmpdir/sr2.o] } {
- unresolved $test1
- unresolved $test2
+ unsupported $test1
+ unsupported $test2
set CC "$old_CC"
set CXX "$old_CXX"
set CXXFLAGS "$old_CXXFLAGS"
}
if ![ld_compile "$CXX $CXXFLAGS -fno-exceptions" $srcdir/$subdir/sr3.cc tmpdir/sr3.o] {
- unresolved $test2
+ unsupported $test2
set CC "$old_CC"
set CXX "$old_CXX"
set CXXFLAGS "$old_CXXFLAGS"
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
send_log "$got\n"
- unresolved "$test_name"
+ fail "$test_name"
remote_file build delete "dump.out"
return
}
if { ![regexp "\n\[ \]*OS/ABI:\[ \]*(.+)\n\[ \]*ABI" \
[file_contents dump.out] nil osabi] } {
verbose "proc check_osabi_tic6x: Readelf failed to extract an ELF header from $binary_file"
- unresolved "$test_name"
+ fail "$test_name"
} elseif { $osabi == $expected_osabi } {
pass "$test_name"
} else {
untested $testline
} elseif { ![ld_compile "$CC -g $NOLTO_CFLAGS" $srcdir/$subdir/undefined.c tmpdir/undefined.o] } {
verbose "Unable to compile test file!" 1
- unresolved $testund
- unresolved $testfn
- unresolved $testline
+ unsupported $testund
+ unsupported $testfn
+ unsupported $testline
} else {
remote_file host delete "tmpdir/undefined"
setup_xfail tic6x-*-*
fail $testname
} else {
- if {![is_remote host] && [which $nm] == 0} then {
- unresolved "$testname (dyn sym)"
+ set exec_output [run_host_cmd "$nm" "-D tmpdir/fundef.so"]
+ set exec_output [prune_warnings $exec_output]
+
+ if { ($asflags == ""
+ || ([regexp ".* undef_fun_typed.*" $exec_output]
+ && [regexp ".* undef_fun_notype.*" $exec_output]))
+ && [regexp ".* undef_data.*" $exec_output]
+ && [regexp ".* undef_pfun.*" $exec_output]
+ && [regexp ".* undef_notype.*" $exec_output]} then {
+ pass "$testname (dyn sym)"
} else {
- set exec_output [run_host_cmd "$nm" "-D tmpdir/fundef.so"]
- set exec_output [prune_warnings $exec_output]
-
- if { ($asflags == ""
- || ([regexp ".* undef_fun_typed.*" $exec_output]
- && [regexp ".* undef_fun_notype.*" $exec_output]))
- && [regexp ".* undef_data.*" $exec_output]
- && [regexp ".* undef_pfun.*" $exec_output]
- && [regexp ".* undef_notype.*" $exec_output]} then {
- pass "$testname (dyn sym)"
- } else {
- fail "$testname (dyn sym)"
- }
+ fail "$testname (dyn sym)"
}
global READELF
- if {![is_remote host] && [which $READELF] == 0} then {
- unresolved "$testname (dyn reloc)"
- } else {
- set exec_output [run_host_cmd "$READELF" "-r tmpdir/fundef.so"]
- set exec_output [prune_warnings $exec_output]
-
- # We ought to get two .rel{a}.plt and three .rel{a}.dyn relocs,
- # except for MIPS targets whose psABI mandates an extra
- # R_MIPS_NONE relocation, also used to pad n64 relocation
- # triplets, and S+core targets using an extra R_SCORE_NONE
- # relocation, so adjust for that.
- switch -glob $target_triplet {
- "mips64*-*-openbsd*" {
- set none_count 6
- set reloc_count 4
- }
- "mips*" -
- "score*" {
- set none_count 1
- set reloc_count 4
- }
- "*" {
- set none_count 0
- set reloc_count 3
- }
+ set exec_output [run_host_cmd "$READELF" "-r tmpdir/fundef.so"]
+ set exec_output [prune_warnings $exec_output]
+
+ # We ought to get two .rel{a}.plt and three .rel{a}.dyn relocs,
+ # except for MIPS targets whose psABI mandates an extra
+ # R_MIPS_NONE relocation, also used to pad n64 relocation
+ # triplets, and S+core targets using an extra R_SCORE_NONE
+ # relocation, so adjust for that.
+ switch -glob $target_triplet {
+ "mips64*-*-openbsd*" {
+ set none_count 6
+ set reloc_count 4
}
-
- if { ($asflags == "" || [regexp ".* contains 2 .*" $exec_output])
- && [regexp ".* contains $reloc_count .*" $exec_output]
- && [regexp -all "_NONE" $exec_output] == $none_count } then {
- pass "$testname (dyn reloc)"
- } else {
- fail "$testname (dyn reloc)"
+ "mips*" -
+ "score*" {
+ set none_count 1
+ set reloc_count 4
+ }
+ "*" {
+ set none_count 0
+ set reloc_count 3
}
}
+
+ if { ($asflags == "" || [regexp ".* contains 2 .*" $exec_output])
+ && [regexp ".* contains $reloc_count .*" $exec_output]
+ && [regexp -all "_NONE" $exec_output] == $none_count } then {
+ pass "$testname (dyn reloc)"
+ } else {
+ fail "$testname (dyn reloc)"
+ }
}
} elseif {![ld_assemble $as $srcdir/$subdir/weak-undef.s \
tmpdir/weak-undef.o]} then {
# It's OK if .weak doesn't work on this target.
- unresolved $testname
+ unsupported $testname
} elseif {![ld_link $ld tmpdir/weak-undef \
"tmpdir/weak-undef.o -T $srcdir/$subdir/weak-undef.t"]} then {
# Weak symbols are broken for non-i386 PE targets.
setup_xfail *-*-pe*
}
fail $testname
-} elseif {![is_remote host] && [which $objdump] == 0} then {
- unresolved $testname
} else {
set exec_output [run_host_cmd "$objdump" "-s tmpdir/weak-undef"]
set exec_output [prune_warnings $exec_output]
if {![ld_link $ld tmpdir/weak-fundef.so \
"$opts tmpdir/weak-fundef.o"]} then {
fail $testname
- } elseif {![is_remote host] && [which $nm] == 0} then {
- unresolved $testname
} else {
set exec_output [run_host_cmd "$nm" "-D tmpdir/weak-fundef.so"]
set exec_output [prune_warnings $exec_output]
if {![ld_link $ld tmpdir/weak-fundef \
"$opts tmpdir/weak-fundef.o tmpdir/weak-fundef.so"]} then {
fail $testname
- } elseif {![is_remote host] && [which $nm] == 0} then {
- unresolved $testname
} else {
set exec_output [run_host_cmd "$nm" "-D tmpdir/weak-fundef"]
set exec_output [prune_warnings $exec_output]
set binfile tmpdir/[lindex $testitem 6]
set cflags [lindex $testitem 7]
set objfiles {}
- set is_unresolved 0
+ set is_unsupported 0
set failed 0
set maybe_failed 0
set ld_output ""
catch "$unbzip2" exec_output
if ![string match "" $exec_output] then {
send_log "$exec_output\n"
- set is_unresolved 1
+ set is_unsupported 1
break
}
} else {
if { [file extension $src_file] == ".c" } {
set as_file "tmpdir/$fileroot.s"
if ![ld_compile "$CC -S $CFLAGS $cflags" $srcdir/$subdir/$src_file $as_file] {
- set is_unresolved 1
+ set is_unsupported 1
break
}
} else {
continue
}
# Catch compiler errors.
- if { $is_unresolved } {
- unresolved $testname
+ if { $is_unsupported } {
+ unsupported $testname
continue
}
set ld_output "$exec_output"
}
+ set is_unresolved 0
if { !$failed } {
foreach actionlist $actions {
set action [lindex $actionlist 0]
}
}
if { $failed != 0 } {
- unresolved $testname
+ unsupported $testname
continue
}
}
}
if { $failed != 0 } {
- unresolved $testname
+ unsupported $testname
continue
}