X-Git-Url: http://drtracing.org/?a=blobdiff_plain;ds=sidebyside;f=ld%2Ftestsuite%2Flib%2Fld-lib.exp;h=0a256c2395faa1df515e253c8a3b90f48ce2f702;hb=5fd104addfddb68844fb8df67be832ee98ad9888;hp=bed5add77f01a9a15967138e514fc6b0be436d9d;hpb=02e0be69012aee9aac0c7adbba1b0516b4dc9218;p=deliverable%2Fbinutils-gdb.git diff --git a/ld/testsuite/lib/ld-lib.exp b/ld/testsuite/lib/ld-lib.exp index bed5add77f..0a256c2395 100644 --- a/ld/testsuite/lib/ld-lib.exp +++ b/ld/testsuite/lib/ld-lib.exp @@ -463,12 +463,10 @@ proc run_ld_link_tests { ldtests args } { global CFLAGS global runtests global exec_output - global ld_elf_shared_opt - if { [is_elf_format] && [check_shared_lib_support] } { - set ld_extra_opt "$ld_elf_shared_opt" - } else { - set ld_extra_opt "" + set ld_extra_opt "" + if [check_relro_support] { + set ld_extra_opt "-z norelro" } foreach testitem $ldtests { @@ -773,14 +771,9 @@ proc run_ld_link_exec_tests { ldtests args } { verbose "$exec_output" 1 set failed 1 } else { - send_log "diff $binfile.out $srcdir/$subdir/$expfile\n" - verbose "diff $binfile.out $srcdir/$subdir/$expfile" - catch "exec diff $binfile.out $srcdir/$subdir/$expfile" exec_output - set exec_output [prune_warnings $exec_output] - - if ![string match "" $exec_output] then { - send_log "$exec_output\n" - verbose "$exec_output" 1 + send_log [file_contents $binfile.out] + verbose [file_contents $binfile.out] 2 + if [regexp_diff "$binfile.out" "$srcdir/$subdir/$expfile"] { set failed 1 } } @@ -928,6 +921,7 @@ proc run_cc_link_tests { ldtests } { if { $binfile eq "tmpdir/" } { # compile only + set binfile $objfile } elseif { [regexp ".*\\.a$" $binfile] } { if { ![ar_simple_create $ar $ldflags $binfile "$objfiles"] } { set failed 1 @@ -1062,7 +1056,8 @@ proc check_gc_sections_available { } { || [istarget pj*-*-*] || [istarget pru*-*-*] || [istarget s12z-*-*] - || [istarget xgate-*-*] } { + || [istarget xgate-*-*] + || [istarget z80-*-*] } { set gc_sections_available_saved 0 return 0 } @@ -1133,7 +1128,8 @@ proc check_plugin_api_available { } { if {![info exists plugin_api_available_saved]} { # Check if the ld used by gcc supports --plugin. set ld_output [remote_exec host $ld "--help"] - if { [ string first "-plugin PLUGIN" $ld_output ] >= 0 } { + if { [regexp -- "-plugin PLUGIN \[^\n\r\]*" $ld_output line] + && ![regexp "ignored" $line] } { set plugin_api_available_saved 1 } else { set plugin_api_available_saved 0