This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
A strip test for ld
- To: nickc at cygnus dot com, binutils at sourceware dot cygnus dot com
- Subject: A strip test for ld
- From: "H . J . Lu" <hjl at valinux dot com>
- Date: Thu, 3 Aug 2000 07:43:40 -0700
Hi, Nick,
I'd like to add this strip test to ld? Is that OK to install?
Thanks.
--
H.J. Lu (hjl@gnu.org)
---
2000-08-03 H.J. Lu (hjl@gnu.org)
* ld-bootstrap/bootstrap.exp: Add strip.
Index: ld-bootstrap/bootstrap.exp
===================================================================
RCS file: /work/cvs/gnu/binutils/ld/testsuite/ld-bootstrap/bootstrap.exp,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 bootstrap.exp
--- ld-bootstrap/bootstrap.exp 1999/06/03 18:02:11 1.1.1.1
+++ ld-bootstrap/bootstrap.exp 2000/08/03 14:33:34
@@ -31,12 +31,17 @@ if ![isnative] {
# really test -r. Use ld1 to link a fresh ld, ld2. Use ld2 to link a
# new ld, ld3. ld2 and ld3 should be identical.
-foreach flags {"" "--static" "--traditional-format" "--no-keep-memory"} {
- if {"$flags" != ""} {
+foreach flags {"" "strip" "--static" "--traditional-format" "--no-keep-memory"} {
+ set do_strip "no"
+ if {"$flags" == "strip"} {
set testname "bootstrap with $flags"
+ set flags ""
+ set do_strip "yes"
+ } else { if {"$flags" != ""} {
+ set testname "bootstrap with $flags"
} else {
set testname "bootstrap"
- }
+ }}
# This test can only be run if we have the ld build directory,
# since we need the object files.
@@ -75,6 +80,16 @@ foreach flags {"" "--static" "--traditio
if ![ld_link $ld tmpdir/ld1 "$flags tmpdir/ld-partial.o $BFDLIB $LIBIBERTY"] {
fail $testname
continue
+ }
+
+ if {"$do_strip" == "yes"} {
+ verbose -log "$strip tmpdir/ld1"
+ catch "exec $strip tmpdir/ld1" exec_output
+ if ![string match "" $exec_output] then {
+ verbose -log "$exec_output"
+ fail $testname
+ continue
+ }
}
if ![ld_link tmpdir/ld1 tmpdir/ld2 "$flags $OFILES $BFDLIB $LIBIBERTY"] {