diff options
Diffstat (limited to 'ld/testsuite/config/default.exp')
-rw-r--r-- | ld/testsuite/config/default.exp | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/ld/testsuite/config/default.exp b/ld/testsuite/config/default.exp new file mode 100644 index 0000000..bdf3b08 --- /dev/null +++ b/ld/testsuite/config/default.exp @@ -0,0 +1,134 @@ +# +# Expect script for LD Regression Tests +# Copyright (C) 1993 Free Software Foundation +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +# +# $Id$ +# +# Written by Jeffrey Wheat (cassidy@cygnus.com) +# + +if ![info exists ld] then { + set ld [findfile $objdir/ld.new $objdir/ld.new [transform ld]] +} + +# load the utility procedures +load_lib ld.exp + +# +# ld_version -- extract and print the version number of ld compiler (GCC) +# +proc ld_version {} { + global ld + default_ld_version $ld +} + +# +# ld_load +# load the program, for now, we just execute it +# +proc ld_load { target1 target2 } { + global exec_output + + if ![file exists $target1] then { + unresolved "$target1 does not exist." + } + + if ![file exists $target2] then { + unresolved "$target2 does not exist." + } + + set status [catch "exec cmp $target1 $target2" exec_output] + verbose "### COMPARE $target1 $target2\n" + if ![string match "" $exec_output] then { + send_log "$exec_output\n" + verbose "$exec_output" 1 + return 1 + } else { + return 0 + } +} + +# +# ld_exit -- just a stub for ld +# +proc ld_exit {} { +} + +# +# ld_start +# relink the linker +# +proc 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_simple_link +# link a program using ld, without including any libraries +# +proc ld_simple_link { ld target objects } { + default_ld_simple_link $ld $target $objects +} + +# +# ld_compile +# compile an object using $cc +# +proc ld_compile { cc source object } { + default_ld_compile $cc $source $object +} + +# +# ld_assemble +# assemble a file +# +proc ld_assemble { as source object } { + default_ld_assemble $as $source $object +} + +# +# ld_nm +# run nm on a file +# +proc ld_nm { nm object } { + default_ld_nm $nm $object +} + +# +# ld_exec +# execute ithe target +# +proc ld_exec { target output } { + default_ld_exec $target $output +} + |