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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 ![info exists objdump] then {
34 set objdump [findfile $base_dir/../binutils/objdump]
37 if ![file isdirectory tmpdir] {catch "exec mkdir tmpdir" status}
39 # load the utility procedures
43 # ld_version -- extract and print the version number of ld compiler (GCC)
47 default_ld_version $ld
51 # ld_exit -- just a stub for ld
60 proc ld_start { ld target } {
66 # link an object using relocation
68 proc ld_relocate { ld target objects } {
69 default_ld_relocate $ld $target $objects
74 # link a program using ld
76 proc ld_link { ld target objects } {
77 default_ld_link $ld $target $objects
82 # link a program using ld, without including any libraries
84 proc ld_simple_link { ld target objects } {
85 default_ld_simple_link $ld $target $objects
90 # compile an object using $cc
92 proc ld_compile { cc source object } {
93 default_ld_compile $cc $source $object
100 proc ld_assemble { as source object } {
101 default_ld_assemble $as $source $object
108 proc ld_nm { nm object } {
109 default_ld_nm $nm $object
114 # execute ithe target
116 proc ld_exec { target output } {
117 default_ld_exec $target $output