1 # Expect script
for ld-versados tests
2 # Copyright
1995, 1997 Free Software Foundation
, Inc.
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.
, 51 Franklin Street
- Fifth Floor
, Boston
, MA
02110-1301, USA.
18 # Written by Steve Chamberlain
(sac@cygnus.com
)
21 # Make sure that
ld can read versados images and
22 # generate binaries which are identical to the customer
's
25 # This test can only be run if ld generates native executables.
27 # This test can only be run on 68k coff targets
28 # Square bracket expressions seem to confuse istarget.
29 if { ![istarget m68k-*-coff*] } then {
33 set testname "LD VERSADOS"
36 proc inspect { whichone } {
43 send_log "$objdump -s tmpdir/$whichone.out >tmpdir/$whichone.dump\n"
44 catch "exec $objdump -s tmpdir/$whichone.out | grep -v srec >tmpdir/$whichone.dump" exec_output
46 if ![string match "" $exec_output] {
47 send_log "$exec_output\n"
53 send_log "$objdump -s $srcdir/$subdir/$whichone.ook >tmpdir/$whichone.dok\n"
54 catch "exec $objdump -s $srcdir/$subdir/$whichone.ook | grep -v srec >tmpdir/$whichone.dok" exec_output
56 if ![string match "" $exec_output] {
57 send_log "$exec_output\n"
63 # compare it with the correct output
64 catch "exec diff tmpdir/$whichone.dump tmpdir/$whichone.dok" exec_output
65 if ![string match "" $exec_output] {
66 send_log "$exec_output\n"
75 if ![ld_simple_link $ld tmpdir/t1.out \
76 " -T $srcdir/$subdir/t1.ld $srcdir/$subdir/t1-1.ro $srcdir/$subdir/t1-2.ro"] {
80 # Get a dump of what we've got
, and what we should have
87 if ![ld_simple_link $
ld tmpdir
/t2.out \
88 " -T $srcdir/$subdir/t2.ld $srcdir/$subdir/t2-2.ro \
89 $srcdir
/$subdir
/t2
-1.ro $srcdir
/$subdir
/t2
-3.ro
"] {
93 #
Get a dump of what we
've got, and what we should have