* gas/mips/ld.d: Adjust to work for both big and little endian
[deliverable/binutils-gdb.git] / ld / testsuite / config / default.exp
CommitLineData
671fe6e9
JW
1#
2# Expect script for LD Regression Tests
3# Copyright (C) 1993 Free Software Foundation
4#
5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
18#
19# $Id$
20#
21# Written by Jeffrey Wheat (cassidy@cygnus.com)
22#
23
5c680d3f
ILT
24if ![info exists ld] then {
25 set ld [findfile $objdir/ld.new $objdir/ld.new [transform ld]]
26}
671fe6e9
JW
27
28# load the utility procedures
29load_lib ld.exp
30
31#
32# ld_version -- extract and print the version number of ld compiler (GCC)
33#
34proc ld_version {} {
35 global ld
36 default_ld_version $ld
37}
38
39#
40# ld_load
41# load the program, for now, we just execute it
42#
43proc ld_load { target1 target2 } {
44 global exec_output
45
46 if ![file exists $target1] then {
47 unresolved "$target1 does not exist."
48 }
49
50 if ![file exists $target2] then {
51 unresolved "$target2 does not exist."
52 }
53
54 set status [catch "exec cmp $target1 $target2" exec_output]
55 verbose "### COMPARE $target1 $target2\n"
56 if ![string match "" $exec_output] then {
57 send_log "$exec_output\n"
58 verbose "$exec_output" 1
59 return 1
60 } else {
61 return 0
62 }
63}
64
65#
66# ld_exit -- just a stub for ld
67#
68proc ld_exit {} {
69}
70
71#
72# ld_start
73# relink the linker
74#
75proc ld_start { ld target } {
26f709de 76 #
671fe6e9 77}
26f709de
JW
78
79#
80# ld_relocate
81# link an object using relocation
82#
83proc ld_relocate { ld target objects } {
84 default_ld_relocate $ld $target $objects
85}
86
87#
88# ld_link
89# link a program using ld
90#
91proc ld_link { ld target objects } {
92 default_ld_link $ld $target $objects
93}
94
9de5523b
ILT
95#
96# ld_simple_link
97# link a program using ld, without including any libraries
98#
99proc ld_simple_link { ld target objects } {
100 default_ld_simple_link $ld $target $objects
101}
102
26f709de
JW
103#
104# ld_compile
105# compile an object using $cc
106#
107proc ld_compile { cc source object } {
108 default_ld_compile $cc $source $object
109}
110
9de5523b
ILT
111#
112# ld_assemble
113# assemble a file
114#
115proc ld_assemble { as source object } {
116 default_ld_assemble $as $source $object
117}
118
119#
120# ld_nm
121# run nm on a file
122#
123proc ld_nm { nm object } {
124 default_ld_nm $nm $object
125}
126
26f709de
JW
127#
128# ld_exec
129# execute ithe target
130#
131proc ld_exec { target output } {
132 default_ld_exec $target $output
133}
134
This page took 0.088302 seconds and 4 git commands to generate.