Index: src/ld/testsuite/lib/ld-lib.exp =================================================================== --- src.orig/ld/testsuite/lib/ld-lib.exp 2006-07-05 12:28:54.000000000 +0100 +++ src/ld/testsuite/lib/ld-lib.exp 2006-07-05 14:24:10.000000000 +0100 @@ -276,6 +276,10 @@ proc default_ld_assemble { as source obj if ![info exists ASFLAGS] { set ASFLAGS "" } set flags [big_or_little_endian] + if {[istarget sh*-*-*] || [istarget pj*-*-*]} { + regsub -- {-EB} $flags {-big} flags + regsub -- {-EL} $flags {-little} flags + } verbose -log "$as $flags $ASFLAGS -o $object $source" Index: src/ld/testsuite/ld-sh/arch/arch.exp =================================================================== --- src.orig/ld/testsuite/ld-sh/arch/arch.exp 2005-05-12 08:32:08.000000000 +0100 +++ src/ld/testsuite/ld-sh/arch/arch.exp 2006-07-05 16:25:05.000000000 +0100 @@ -76,9 +76,11 @@ proc test_arch { file1 file2 arch result set name2 [file tail $file2] set rootname2 [file rootname $name2] + set flags [big_or_little_endian] + # This must use -r to prevent LD trying to relocate the (unrealistic) file - send_log "$LD -r -o ${rootname1}_${rootname2}.o $file1 $file2\n" - catch "exec $LD -r -o ${rootname1}_${rootname2}.o $file1 $file2" ld_output + send_log "$LD $flags -r -o ${rootname1}_${rootname2}.o $file1 $file2\n" + catch "exec $LD $flags -r -o ${rootname1}_${rootname2}.o $file1 $file2" ld_output send_log $ld_output if {[string equal $ld_output ""] == 1} then { @@ -117,9 +119,11 @@ proc test_arch_error { file1 file2 resul set name2 [file tail $file2] set rootname2 [file rootname $name2] + set flags [big_or_little_endian] + # This must use -r to prevent LD trying to relocate the (unrealistic) file - send_log "$LD -r -o ${rootname1}_${rootname2}.o $file1 $file2\n" - catch "exec $LD -r -o ${rootname1}_${rootname2}.o $file1 $file2" ld_output + send_log "$LD $flags -r -o ${rootname1}_${rootname2}.o $file1 $file2\n" + catch "exec $LD $flags -r -o ${rootname1}_${rootname2}.o $file1 $file2" ld_output send_log $ld_output if {[string equal $ld_output ""] == 1} then {