1 # Expect script
for ld-versados tests
2 # Copyright
1995, 1997, 2007 Free Software Foundation
, Inc.
4 # This file is part of the GNU Binutils.
6 # This
program is free software
; you can redistribute it and
/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation
; either version
3 of the License
, or
9 #
(at your option
) any later version.
11 # This
program is distributed in the hope that it will be useful
,
12 # but WITHOUT
ANY WARRANTY
; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License
for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this
program; if not
, write to the Free Software
18 # Foundation
, Inc.
, 51 Franklin Street
- Fifth Floor
, Boston
,
21 # Written by Steve Chamberlain
(sac@cygnus.com
)
24 # Make sure that
ld can read versados images and
25 # generate binaries which are identical to the customer
's
28 # This test can only be run if ld generates native executables.
30 # This test can only be run on 68k coff targets
31 # Square bracket expressions seem to confuse istarget.
32 if { ![istarget m68k-*-coff*] } then {
36 set testname "LD VERSADOS"
39 proc inspect { whichone } {
46 send_log "$objdump -s tmpdir/$whichone.out >tmpdir/$whichone.dump\n"
47 catch "exec $objdump -s tmpdir/$whichone.out | grep -v srec >tmpdir/$whichone.dump" exec_output
49 if ![string match "" $exec_output] {
50 send_log "$exec_output\n"
56 send_log "$objdump -s $srcdir/$subdir/$whichone.ook >tmpdir/$whichone.dok\n"
57 catch "exec $objdump -s $srcdir/$subdir/$whichone.ook | grep -v srec >tmpdir/$whichone.dok" exec_output
59 if ![string match "" $exec_output] {
60 send_log "$exec_output\n"
66 # compare it with the correct output
67 catch "exec diff tmpdir/$whichone.dump tmpdir/$whichone.dok" exec_output
68 if ![string match "" $exec_output] {
69 send_log "$exec_output\n"
78 if ![ld_simple_link $ld tmpdir/t1.out \
79 " -T $srcdir/$subdir/t1.ld $srcdir/$subdir/t1-1.ro $srcdir/$subdir/t1-2.ro"] {
83 # Get a dump of what we've got
, and what we should have
90 if ![ld_simple_link $
ld tmpdir
/t2.out \
91 " -T $srcdir/$subdir/t2.ld $srcdir/$subdir/t2-2.ro \
92 $srcdir
/$subdir
/t2
-1.ro $srcdir
/$subdir
/t2
-3.ro
"] {
96 #
Get a dump of what we
've got, and what we should have