aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-bootstrap
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-11-12 16:26:17 +0000
committerNick Clifton <nickc@redhat.com>2001-11-12 16:26:17 +0000
commitd7b784871a7fae00ddc8d0110061476db0c276e9 (patch)
tree2d0cab2c41b5ee6b5f21dbbac75041d2930a5364 /ld/testsuite/ld-bootstrap
parent7559e86e56cadb67d9709eba814ba3051453a2be (diff)
downloadfsf-binutils-gdb-d7b784871a7fae00ddc8d0110061476db0c276e9.zip
fsf-binutils-gdb-d7b784871a7fae00ddc8d0110061476db0c276e9.tar.gz
fsf-binutils-gdb-d7b784871a7fae00ddc8d0110061476db0c276e9.tar.bz2
Only compare the tail end of the two binary files produced in order to avoid
date stamp present in PE binaries.
Diffstat (limited to 'ld/testsuite/ld-bootstrap')
-rw-r--r--ld/testsuite/ld-bootstrap/bootstrap.exp14
1 files changed, 11 insertions, 3 deletions
diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp
index 6eb40a2..0e82a6a 100644
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -127,9 +127,17 @@ foreach flags {"" "strip" "--static" "--traditional-format" "--no-keep-memory"}
}
}
- send_log "cmp tmpdir/ld2 tmpdir/ld3\n"
- verbose "cmp tmpdir/ld2 tmpdir/ld3"
- catch "exec cmp tmpdir/ld2 tmpdir/ld3" exec_output
+ send_log "compare (tail of) tmpdir/ld2 tmpdir/ld3\n"
+ verbose "compare (tail of) tmpdir/ld2 tmpdir/ld3"
+ # Trim off the date present in PE binaries by only looking
+ # at the ends of the files
+ # Although this works, a way to set the date would be better.
+ # Removing or zeroing the date stamp in the binary produced by
+ # the linker is not possible as it is required by the target OS.
+ exec tail +140 tmpdir/ld2 >tmpdir/ld2tail
+ exec tail +140 tmpdir/ld3 >tmpdir/ld3tail
+ catch "exec cmp tmpdir/ld2tail tmpdir/ld3tail" exec_output
+ exec rm tmpdir/ld2tail tmpdir/ld3tail
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {