bfd:
2007-08-28 Mark Shinwell <shinwell@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * elf32-arm.c (elf32_arm_compare_mapping): Compare first on vma, then on type. binutils/testsuite: 2007-08-28 Mark Shinwell <shinwell@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * binutils-all/ar.exp (long_filenames): Delete temporary files on the host. * binutils-all/arm/objdump.exp: Only check "which $OBJDUMP" if host is local. * binutils-all/objcopy.exp: Use ${srecfile} to get the name of the srec file to be passed to binutils_run. (objcopy_test_readelf): Use remote_exec. * binutils-all/readelf.exp (readelf_find_size): Use remote_exec. (readelf_test): Likewise. (readelf_wi_test): Likewise. * lib/utils-lib.exp (run_dump_test): Only check "which $binary" if host is local. Use remote_exec. Use $tempfile not tmpdir/bintest.o. gas: 2007-08-28 Mark Shinwell <shinwell@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * as.c (main): Flush stderr before printing listings to ensure consistent output order across platforms. gas/testsuite: 2007-08-28 Mark Shinwell <shinwell@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * lib/gas-defs.exp (gas_version): Use remote_* functions instead of exec. (gas_host_run): New. (gas_run): Use gas_host_run. (gas_start): Likewise. (run_dump_test): Likewise. (objdump): Use gas_host_run. (objdump_start_no_subdir): Likewise. * lib/gas-dg.exp (gas-dg-test): Use "remote_file host delete". * lib/run: Remove. * gas/macros/macros.exp: Download app4b.s to host. * gas/i386/i386.exp (gas_64_check): Use gas_host_run. (gas_32_check): Likewise. * gas/maxq10/maxq10.exp (gas_64_check): Likewise (gas_32_check): Likewise. * gas/maxq20/maxq20.exp (gas_64_check): Likewise (gas_32_check): Likewise. * gas/sparc/sparc.exp (gas_64_check): Likewise. * gas/cfi/cfi.exp: Likewise. * gas/elf/elf.exp (run_list_test): Likewise. Use temporary file for readelf output in place of pipe. * gas/all/gas.exp: Download incbin.dat to host. (do_comment): Allow \r\r\n. ld: 2007-08-28 Mark Shinwell <shinwell@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * ldlang.c (sort_sections_by_lma): Sort by internal id after lma for stable sort. ld/testsuite: 2007-08-28 Mark Shinwell <shinwell@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * ld-elfcomm/elfcomm.exp: Use run_host_cmd. Only check "which $CC" if host is local. * ld-checks/checks.exp: Use run_host_cmd. * ld-elf/exclude.exp: Likewise. * ld-elf/elf.exp: Download merge.ld if host is remote. * ld-elf/binutils.exp (binutils_test): Use remote_exec. * ld-elf/tls_common.exp: Use run_host_cmd. * lib/ld-lib.exp (ld_version): Only check "which $ld" if host is local. Use remote_exec. (run_host_cmd): New. (run_host_cmd_yesno): New. (default_ld_relocate): Use run_host_cmd_yesno. (default_ld_link): Likewise. (default_ld_simple_link): Use run_host_cmd. (default_ld_compile): Only check "which $ccprog" if host is local. Use remote_file and remote_exec. (default_ld_assemble): Only check "which $as" if host is local. Use run_host_cmd. (default_ld_nm): Use remote_exec, remote_upload and remote_file. (run_dump_test): Use remote_exec, remote_upload and remote_file. Only check "which $binary" if host is local. (run_ld_link_tests): Use remote_exec, remote_upload and remote_file. * ld-selective/selective.exp: Only check "which $CXX" if host is local. Use remote_exec. * ld-scripts/phdrs.exp: Only check "which $objdump" if host is local. Use run_host_cmd. * ld-scripts/phdrs2.exp: Likewise. * ld-scripts/weak.exp: Likewise. * ld-undefined/weak-undef.exp: Likewise. * ld-scripts/crossref.exp: Only check "which $CC" if host is local. Use run_host_cmd. * ld-scripts/map-address.exp: Upload map_address.map if host is remote. * ld-srec/srec.exp (run_srec_tests): Use run_host_cmd. Only check "which $CC" and "which $CXX" if host is local. * ld-undefined/undefined.exp: Only check "which $CC" if host is local. Use remote_file and run_host_cmd. * config/default.exp: Use remote_exec to create tmpdir.
This commit is contained in:
parent
ad71ef64ac
commit
7f6a71ffb6
42 changed files with 450 additions and 242 deletions
|
@ -42,6 +42,7 @@ proc long_filenames { } {
|
|||
set file2 tmpdir/$n2
|
||||
|
||||
remote_file build delete $file1
|
||||
remote_file host delete $n1
|
||||
|
||||
# Some file systems truncate file names at 14 characters, which
|
||||
# makes it impossible to run this test. Check for that now.
|
||||
|
@ -54,8 +55,8 @@ proc long_filenames { } {
|
|||
puts $f "first"
|
||||
close $f
|
||||
|
||||
|
||||
remote_file build delete $file2
|
||||
remote_file host delete $n2
|
||||
|
||||
set status [catch "set f [open tmpdir/$n2 w]" errs]
|
||||
if { $status != 0 } {
|
||||
|
|
|
@ -19,7 +19,7 @@ if {![istarget "arm*-*-*"]} then {
|
|||
return
|
||||
}
|
||||
|
||||
if {[which $OBJDUMP] == 0} then {
|
||||
if {![is_remote host] && [which $OBJDUMP] == 0} then {
|
||||
perror "$OBJDUMP does not exist"
|
||||
return
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ if ![string match "" $got] then {
|
|||
verbose $line
|
||||
fail "objcopy -O srec"
|
||||
} else {
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f ${copyfile}.srec"]
|
||||
set got [binutils_run $OBJDUMP "$OBJDUMPFLAGS -f ${srecfile}"]
|
||||
if ![regexp "file format srec" $got] then {
|
||||
send_log "objdump failed\n"
|
||||
fail "objcopy -O srec"
|
||||
|
@ -722,23 +722,32 @@ proc objcopy_test_readelf {testname srcfile} {
|
|||
}
|
||||
|
||||
verbose -log "$OBJCOPY $OBJCOPYFLAGS tmpdir/bintest.o tmpdir/copy.o"
|
||||
catch "exec $OBJCOPY $OBJCOPYFLAGS tmpdir/bintest.o tmpdir/copy.o" exec_output
|
||||
if ![string match "" $exec_output] then {
|
||||
set exec_output [remote_exec host "$OBJCOPY $OBJCOPYFLAGS tmpdir/bintest.o tmpdir/copy.o"]
|
||||
if { [lindex $exec_output 0] != 0
|
||||
|| ![string match "" [lindex $exec_output 1]] } then {
|
||||
fail "objcopy ($testname)"
|
||||
return
|
||||
}
|
||||
|
||||
verbose -log "$READELF -a tmpdir/bintest.o > tmpdir/bintest.o.out"
|
||||
catch "exec $READELF -a tmpdir/bintest.o > tmpdir/bintest.o.out" exec_output
|
||||
set exec_output [prune_warnings $exec_output]
|
||||
set exec_output [remote_exec host "$READELF -a tmpdir/bintest.o" "" "/dev/null" "tmpdir/bintest.o.out"]
|
||||
if { [lindex $exec_output 0] != 0 } then {
|
||||
unresolved "objcopy ($testname)"
|
||||
return
|
||||
}
|
||||
set exec_output [prune_warnings [lindex $exec_output 1]]
|
||||
if ![string match "" $exec_output] then {
|
||||
unresolved "objcopy ($testname)"
|
||||
return
|
||||
}
|
||||
|
||||
verbose -log "$READELF -a tmpdir/copy.o > tmpdir/copy.o.out"
|
||||
catch "exec $READELF -a tmpdir/copy.o > tmpdir/copy.o.out" exec_output
|
||||
set exec_output [prune_warnings $exec_output]
|
||||
set exec_output [remote_exec host "$READELF -a tmpdir/copy.o" "" "/dev/null" "tmpdir/copy.o.out"]
|
||||
if { [lindex $exec_output 0] != 0 } then {
|
||||
unresolved "objcopy ($testname)"
|
||||
return
|
||||
}
|
||||
set exec_output [prune_warnings [lindex $exec_output 1]]
|
||||
if ![string match "" $exec_output] then {
|
||||
unresolved "objcopy ($testname)"
|
||||
return
|
||||
|
|
|
@ -41,9 +41,12 @@ proc readelf_find_size { binary_file } {
|
|||
|
||||
set readelf_size ""
|
||||
set testname "finding out ELF size with readelf -h"
|
||||
catch "exec $READELF $READELFFLAGS -h $binary_file > readelf.out" got
|
||||
set got [remote_exec host "$READELF $READELFFLAGS -h $binary_file" "" "/dev/null" "readelf.out"]
|
||||
if [is_remote host] then {
|
||||
remote_upload host "readelf.out"
|
||||
}
|
||||
|
||||
if ![string match "" $got] then {
|
||||
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]]} then {
|
||||
send_log $got
|
||||
fail $testname
|
||||
return
|
||||
|
@ -76,13 +79,13 @@ proc readelf_test { options binary_file regexp_file xfails } {
|
|||
global subdir
|
||||
|
||||
send_log "exec $READELF $READELFFLAGS $options $binary_file > readelf.out\n"
|
||||
catch "exec $READELF $READELFFLAGS $options $binary_file > readelf.out" got
|
||||
set got [remote_exec host "$READELF $READELFFLAGS $options $binary_file" "" "/dev/null" "readelf.out"]
|
||||
|
||||
foreach xfail $xfails {
|
||||
setup_xfail $xfail
|
||||
}
|
||||
|
||||
if ![string match "" $got] then {
|
||||
if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then {
|
||||
fail "readelf $options (reason: unexpected output)"
|
||||
send_log $got
|
||||
send_log "\n"
|
||||
|
@ -146,8 +149,7 @@ proc readelf_wi_test {} {
|
|||
set tempfile [remote_download host tmpdir/testprog.o]
|
||||
|
||||
# Run "readelf -wi" on it.
|
||||
send_log "exec $READELF $READELFFLAGS -wi $tempfile > readelf.out\n"
|
||||
catch "exec $READELF $READELFFLAGS -wi $tempfile > readelf.out" got
|
||||
set got [remote_exec host "$READELF $READELFFLAGS -wi $tempfile" "" "/dev/null" "readelf.out"]
|
||||
|
||||
# Upload the results.
|
||||
set output [remote_upload host readelf.out]
|
||||
|
@ -155,7 +157,7 @@ proc readelf_wi_test {} {
|
|||
file_on_host delete $tempfile
|
||||
|
||||
# Strip any superflous warnings.
|
||||
set got [prune_readelf_wi_warnings $got]
|
||||
set got [prune_readelf_wi_warnings [lindex $got 1]]
|
||||
|
||||
if ![string match "" $got] then {
|
||||
fail "readelf $READELFFLAGS -wi (reason: unexpected output)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue