aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-11-14 11:18:42 +0000
committerNick Clifton <nickc@redhat.com>2001-11-14 11:18:42 +0000
commit86017ce9182c6fbf7ac2a6da323366bd765c2536 (patch)
treefbf2921058299cdd7a9f5a5625889cca33ada36e /ld/testsuite
parentd03ba2a185802111cea970f8d7e01321fc9fb039 (diff)
downloadgdb-86017ce9182c6fbf7ac2a6da323366bd765c2536.zip
gdb-86017ce9182c6fbf7ac2a6da323366bd765c2536.tar.gz
gdb-86017ce9182c6fbf7ac2a6da323366bd765c2536.tar.bz2
Only scan tail of executable for PE targets.
Diffstat (limited to 'ld/testsuite')
-rw-r--r--ld/testsuite/ChangeLog5
-rw-r--r--ld/testsuite/ld-bootstrap/bootstrap.exp25
2 files changed, 21 insertions, 9 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog
index 3855377..1a5c728 100644
--- a/ld/testsuite/ChangeLog
+++ b/ld/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-14 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * ld-bootstrap/bootstrap.exp: Only scan tail of executable for
+ PE targets.
+
2001-11-12 Donn Terry <donnte@microsoft.com>
* ld-bootstrap/bootstrap.exp: Only compare the tail end of the two
diff --git a/ld/testsuite/ld-bootstrap/bootstrap.exp b/ld/testsuite/ld-bootstrap/bootstrap.exp
index 0e82a6a..69d3088 100644
--- a/ld/testsuite/ld-bootstrap/bootstrap.exp
+++ b/ld/testsuite/ld-bootstrap/bootstrap.exp
@@ -129,15 +129,22 @@ foreach flags {"" "strip" "--static" "--traditional-format" "--no-keep-memory"}
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
+ if {[istarget "*-*-pe"]
+ || [istarget "*-*-wince"]} {
+ # 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
+ } else {
+ send_log "cmp tmpdir/ld2 tmpdir/ld3\n"
+ verbose "cmp tmpdir/ld2 tmpdir/ld3"
+ catch "exec cmp tmpdir/ld2 tmpdir/ld3" exec_output
+ }
set exec_output [prune_warnings $exec_output]
if [string match "" $exec_output] then {