X-Git-Url: https://oss.titaniummirror.com/gitweb?p=msp430-binutils.git;a=blobdiff_plain;f=ld%2Ftestsuite%2Fld-elf%2Fbinutils.exp;fp=ld%2Ftestsuite%2Fld-elf%2Fbinutils.exp;h=8eba578f3087e246b7f57353a80f3af47a0513a3;hp=52ac03b2f4b7a811a26f86e0dfcf11034b396314;hb=d5da4f291af551c0b8b79e1d4a9b173d60e5c10e;hpb=7b5ea4fcdf2819e070665ab5610f8b48e3867c10 diff --git a/ld/testsuite/ld-elf/binutils.exp b/ld/testsuite/ld-elf/binutils.exp index 52ac03b..8eba578 100644 --- a/ld/testsuite/ld-elf/binutils.exp +++ b/ld/testsuite/ld-elf/binutils.exp @@ -1,5 +1,5 @@ # Expect script for binutils tests -# Copyright 2006, 2007 Free Software Foundation, Inc. +# Copyright 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # # This file is part of the GNU Binutils. # @@ -62,24 +62,24 @@ proc binutils_test { prog_name ld_options test } { } send_log "$READELF -l --wide tmpdir/$test > tmpdir/$test.exp\n" - catch "exec $READELF -l --wide tmpdir/$test > tmpdir/$test.exp" got - if ![string match "" $got] then { + 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" return } send_log "$prog tmpdir/$test\n" - catch "exec $prog tmpdir/$test" got - if ![string match "" $got] then { + set got [remote_exec host "$prog tmpdir/$test"] + if { [lindex $got 0] != 0 || ![string match "" [lindex $got 1]] } then { send_log "$got\n" fail "$test_name" return } send_log "$READELF -l --wide tmpdir/$test > tmpdir/$test.out\n" - catch "exec $READELF -l --wide tmpdir/$test > tmpdir/$test.out" got - if ![string match "" $got] then { + 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" return @@ -104,24 +104,44 @@ binutils_test strip "-shared" maxpage1 binutils_test objcopy "" maxpage1 binutils_test objcopy "-shared" maxpage1 -binutils_test strip "-z relro" maxpage1 -binutils_test strip "-z relro -shared" maxpage1 -binutils_test objcopy "-z relro" maxpage1 -binutils_test objcopy "-z relro -shared" maxpage1 +binutils_test strip "-z relro" relro1 +binutils_test strip "-z relro -shared" relro1 +binutils_test objcopy "-z relro" relro1 +binutils_test objcopy "-z relro -shared" relro1 +if { ([istarget "i?86-*-elf*"] + || ([istarget "i?86-*-linux*"] + && ![istarget "*-*-*aout*"] + && ![istarget "*-*-*oldld*"]) + || [istarget "x86_64-*-linux*"] + || [istarget "amd64-*-linux*"]) } { + binutils_test strip "-z relro -shared" relro2 + binutils_test objcopy "-z relro -shared" relro2 +} + +binutils_test strip "-T ${srcdir}/${subdir}/lma.lnk" lma binutils_test objcopy "" tbss1 +binutils_test objcopy "-z relro" tbss1 binutils_test objcopy "-shared" tbss1 +binutils_test objcopy "-shared -z relro" tbss1 binutils_test objcopy "-z max-page-size=0x100000" tbss1 binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tbss1 binutils_test objcopy "" tdata1 +binutils_test objcopy "-z relro" tdata1 binutils_test objcopy "-shared" tdata1 +binutils_test objcopy "-shared -z relro" tdata1 binutils_test objcopy "-z max-page-size=0x100000" tdata1 binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tdata1 binutils_test objcopy "" tbss2 +binutils_test objcopy "-z relro" tbss2 binutils_test objcopy "-shared" tbss2 +binutils_test objcopy "-shared -z relro" tbss2 binutils_test objcopy "-z max-page-size=0x100000" tbss2 binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tbss2 -binutils_test objcopy "-z max-page-size=0x100000" tdata2 + binutils_test objcopy "" tdata2 +binutils_test objcopy "-z relro" tdata2 binutils_test objcopy "-shared" tdata2 +binutils_test objcopy "-shared -z relro" tdata2 +binutils_test objcopy "-z max-page-size=0x100000" tdata2 binutils_test objcopy "-z max-page-size=0x100000 -z common-page-size=0x1000" tdata2