1 # Basic expect script for LD Regression Tests
2 # Copyright (C) 1993,1994 Free Software Foundation
4 # This file is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
18 # Written by Jeffrey Wheat (cassidy@cygnus.com)
21 if ![info exists ld] then {
22 set ld [findfile $objdir/ld.new $objdir/ld.new [transform ld]]
25 if ![info exists as] then {
26 set as [findfile $base_dir/../gas/as.new $base_dir/../gas/as.new [transform as]]
29 if ![info exists nm] then {
30 set nm [findfile $base_dir/../binutils/nm.new $base_dir/../binutils/nm.new [transform nm]]
33 if ![file isdirectory tmpdir] {catch "exec mkdir tmpdir" status}
35 # load the utility procedures
39 # ld_version -- extract and print the version number of ld compiler (GCC)
43 default_ld_version $ld
47 # ld_exit -- just a stub for ld
56 proc ld_start { ld target } {
62 # link an object using relocation
64 proc ld_relocate { ld target objects } {
65 default_ld_relocate $ld $target $objects
70 # link a program using ld
72 proc ld_link { ld target objects } {
73 default_ld_link $ld $target $objects
78 # link a program using ld, without including any libraries
80 proc ld_simple_link { ld target objects } {
81 default_ld_simple_link $ld $target $objects
86 # compile an object using $cc
88 proc ld_compile { cc source object } {
89 default_ld_compile $cc $source $object
96 proc ld_assemble { as source object } {
97 default_ld_assemble $as $source $object
104 proc ld_nm { nm object } {
105 default_ld_nm $nm $object
110 # execute ithe target
112 proc ld_exec { target output } {
113 default_ld_exec $target $output