From 26f709de0fdfd4d32acae00ef1596f17ba310df7 Mon Sep 17 00:00:00 2001 From: Jeffrey Wheat Date: Thu, 12 Aug 1993 23:19:09 +0000 Subject: [PATCH] cleaned up tests to work like they did originally in the makefile --- ld/testsuite/config/unix-ld.exp | 35 ++++++++++++++++++++++++- ld/testsuite/ld.bootstrap/bootstrap.exp | 18 +++++++++---- 2 files changed, 47 insertions(+), 6 deletions(-) diff --git a/ld/testsuite/config/unix-ld.exp b/ld/testsuite/config/unix-ld.exp index 97769386ad6..3720d1a2ce2 100644 --- a/ld/testsuite/config/unix-ld.exp +++ b/ld/testsuite/config/unix-ld.exp @@ -71,5 +71,38 @@ proc ld_exit {} { # relink the linker # proc ld_start { ld target } { - default_ld_start $ld $target + # } + +# +# ld_relocate +# link an object using relocation +# +proc ld_relocate { ld target objects } { + default_ld_relocate $ld $target $objects +} + +# +# ld_link +# link a program using ld +# +proc ld_link { ld target objects } { + default_ld_link $ld $target $objects +} + +# +# ld_compile +# compile an object using $cc +# +proc ld_compile { cc source object } { + default_ld_compile $cc $source $object +} + +# +# ld_exec +# execute ithe target +# +proc ld_exec { target output } { + default_ld_exec $target $output +} + diff --git a/ld/testsuite/ld.bootstrap/bootstrap.exp b/ld/testsuite/ld.bootstrap/bootstrap.exp index d817fa0fa06..11f52a8df6f 100644 --- a/ld/testsuite/ld.bootstrap/bootstrap.exp +++ b/ld/testsuite/ld.bootstrap/bootstrap.exp @@ -28,8 +28,18 @@ if $tracelevel then { set tmpdir /tmp set stage 0 -# link the target with itself -ld_start $objdir/ld.new $tmpdir/ld.$stage + +# +# link an object using relocation +# + +ld_relocate $objdir/ld.new $tmpdir/ld-partial.o $OFILES + +ld_link $objdir/ld.new $tmpdir/ld.partial $tmpdir/ld-partial.o + +ld_link $tmpdir/ld.partial $tmpdir/ld.full $OFILES + +ld_link $tmpdir/ld.full $tmpdir/ld.$stage $OFILES # # main test loop @@ -53,7 +63,7 @@ for { set stage 0 } { $stage < 9 } { incr stage } { verbose "### stage is now $stage\n" 1 # link the target with itself - ld_start $ld_old $ld_new + ld_link $ld_old $ld_new $OFILES # load (compare) the target if ![file exists $ld_old] then { @@ -87,5 +97,3 @@ catch "exec rm -f $ld_old" result verbose "### EXEC rm -f $ld_old $ld_new" catch "exec rm -f $ld_old $ld_new" result ld_exit - - -- 2.30.2