1994-11-28 16:26:30 +00:00
|
|
|
# Basic expect script for LD Regression Tests
|
|
|
|
# Copyright (C) 1993,1994 Free Software Foundation
|
1993-08-05 04:14:51 +00:00
|
|
|
#
|
|
|
|
# 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
|
1995-07-07 22:49:42 +00:00
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
1993-08-05 04:14:51 +00:00
|
|
|
#
|
|
|
|
# Written by Jeffrey Wheat (cassidy@cygnus.com)
|
|
|
|
#
|
|
|
|
|
1994-09-27 22:23:51 +00:00
|
|
|
if ![info exists ld] then {
|
|
|
|
set ld [findfile $objdir/ld.new $objdir/ld.new [transform ld]]
|
|
|
|
}
|
1993-08-05 04:14:51 +00:00
|
|
|
|
1994-11-28 16:26:30 +00:00
|
|
|
if ![info exists as] then {
|
|
|
|
set as [findfile $base_dir/../gas/as.new $base_dir/../gas/as.new [transform as]]
|
|
|
|
}
|
|
|
|
|
|
|
|
if ![info exists nm] then {
|
|
|
|
set nm [findfile $base_dir/../binutils/nm.new $base_dir/../binutils/nm.new [transform nm]]
|
|
|
|
}
|
|
|
|
|
1995-07-07 22:49:42 +00:00
|
|
|
if ![info exists objdump] then {
|
|
|
|
set objdump [findfile $base_dir/../binutils/objdump]
|
|
|
|
}
|
|
|
|
|
1994-11-28 16:26:30 +00:00
|
|
|
if ![file isdirectory tmpdir] {catch "exec mkdir tmpdir" status}
|
|
|
|
|
1993-08-05 04:14:51 +00:00
|
|
|
# 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_exit -- just a stub for ld
|
|
|
|
#
|
|
|
|
proc ld_exit {} {
|
|
|
|
}
|
|
|
|
|
|
|
|
#
|
|
|
|
# ld_start
|
|
|
|
# relink the linker
|
|
|
|
#
|
|
|
|
proc ld_start { ld target } {
|
1993-08-12 23:19:09 +00:00
|
|
|
#
|
1993-08-05 04:14:51 +00:00
|
|
|
}
|
1993-08-12 23:19:09 +00:00
|
|
|
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
}
|
|
|
|
|
1994-09-28 00:06:27 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
}
|
|
|
|
|
1993-08-12 23:19:09 +00:00
|
|
|
#
|
|
|
|
# ld_compile
|
|
|
|
# compile an object using $cc
|
|
|
|
#
|
|
|
|
proc ld_compile { cc source object } {
|
|
|
|
default_ld_compile $cc $source $object
|
|
|
|
}
|
|
|
|
|
1994-09-28 00:06:27 +00:00
|
|
|
#
|
|
|
|
# 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
|
|
|
|
}
|
|
|
|
|
1993-08-12 23:19:09 +00:00
|
|
|
#
|
|
|
|
# ld_exec
|
|
|
|
# execute ithe target
|
|
|
|
#
|
|
|
|
proc ld_exec { target output } {
|
|
|
|
default_ld_exec $target $output
|
|
|
|
}
|
|
|
|
|