aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2001-11-29 17:34:07 +0000
committerH.J. Lu <hjl.tools@gmail.com>2001-11-29 17:34:07 +0000
commit1983fbac47a0b7d202177901477a3de326d339dd (patch)
tree6284aabdd2b394134aae3bbca6bfca8e75ec26c6
parent164746680eafb3c66bb8b3c2738491027e6de66c (diff)
downloadgdb-1983fbac47a0b7d202177901477a3de326d339dd.zip
gdb-1983fbac47a0b7d202177901477a3de326d339dd.tar.gz
gdb-1983fbac47a0b7d202177901477a3de326d339dd.tar.bz2
2001-11-29 H.J. Lu <hjl@gnu.org>
* binutils-all/objcopy.exp (strip_test): Add strip on archive.
-rw-r--r--binutils/testsuite/ChangeLog4
-rw-r--r--binutils/testsuite/binutils-all/objcopy.exp29
2 files changed, 33 insertions, 0 deletions
diff --git a/binutils/testsuite/ChangeLog b/binutils/testsuite/ChangeLog
index e6f0d94..90b786a 100644
--- a/binutils/testsuite/ChangeLog
+++ b/binutils/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2001-11-29 H.J. Lu <hjl@gnu.org>
+
+ * binutils-all/objcopy.exp (strip_test): Add strip on archive.
+
2001-11-15 Alan Modra <amodra@bigpond.net.au>
* binutils-all/objcopy.exp: Allow '? main', to suit powerpc64.
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index 7c16a51..406b09d 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -314,6 +314,7 @@ if {$low == "" || $origstart == ""} then {
# Test stripping an object.
proc strip_test { } {
+ global AR
global CC
global STRIP
global STRIPFLAGS
@@ -330,6 +331,34 @@ proc strip_test { } {
}
if [is_remote host] {
+ set archive libstrip.a
+ set objfile [remote_download host tmpdir/testprog.o];
+ remote_file host delete $archive
+ } else {
+ set archive tmpdir/libstrip.a
+ set objfile tmpdir/testprog.o
+ }
+
+ remote_file build delete tmpdir/libstrip.a
+
+ set exec_output [binutils_run $AR "rc $archive ${objfile}"]
+ if ![string match "" $exec_output] {
+ fail $test
+ return
+ }
+
+ set exec_output [binutils_run $STRIP "$STRIPFLAGS $archive"]
+ if ![string match "" $exec_output] {
+ fail $test
+ return
+ }
+
+ if { [target_compile $srcdir/$subdir/testprog.c tmpdir/testprog.o object debug] != "" } {
+ untested $test
+ return
+ }
+
+ if [is_remote host] {
set objfile [remote_download host tmpdir/testprog.o];
} else {
set objfile tmpdir/testprog.o