aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorPer Bothner <per@bothner.com>1992-08-05 18:46:00 +0000
committerPer Bothner <per@bothner.com>1992-08-05 18:46:00 +0000
commitee9d275b29f54966d7a52ce410bff7f194cd23c1 (patch)
tree99440bee2b84412242c61221d790363a4ab2a8fc /binutils
parent15ee4caab231b40b30ecf294454b82c0473401e2 (diff)
downloadgdb-ee9d275b29f54966d7a52ce410bff7f194cd23c1.zip
gdb-ee9d275b29f54966d7a52ce410bff7f194cd23c1.tar.gz
gdb-ee9d275b29f54966d7a52ce410bff7f194cd23c1.tar.bz2
* copy.c: When is_strip (because it is invoked as the strip
program), follow traditional argv processing: 'strip file1 file2' now strips file1 and file2, rather than stripping file1 (as input), leaving output in file2.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog15
-rw-r--r--binutils/copy.c34
2 files changed, 49 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index a603746..b4f9c42 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,18 @@
+Wed Aug 5 11:25:27 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * copy.c: When is_strip (because it is invoked as the strip
+ program), follow traditional argv processing:
+ 'strip file1 file2' now strips file1 and file2, rather
+ than stripping file1 (as input), leaving output in file2.
+
+Mon Jul 27 16:28:08 1992 Per Bothner (bothner@rtl.cygnus.com)
+
+ * objdump.c (display_info, display_info_table): Call
+ bfd_set_format() on dummy bfd before using it (twice).
+ * ar.c: Make sure archive is created on command 'r'
+ even when no elements are inserted. (Clean up and
+ simplify some non-working related code.)
+
Mon Jul 20 02:48:38 1992 D. V. Henkel-Wallace (gumby@cygnus.com)
* configure.in: hppa support doesn't assume hp OS (from sef).
diff --git a/binutils/copy.c b/binutils/copy.c
index 12d2f35..fbf6f05 100644
--- a/binutils/copy.c
+++ b/binutils/copy.c
@@ -51,6 +51,14 @@ usage()
exit(1);
}
+static
+void
+strip_usage()
+{
+ fprintf(stderr, "Usage %s [-v] filename ...\n", program_name);
+ exit(1);
+}
+
/* Create a temp file in the same directory as supplied */
static
@@ -394,6 +402,32 @@ main(argc, argv)
is_strip = (i >= 5 && strcmp(program_name+i-5,"strip"));
}
+ if (is_strip)
+ {
+ for (i = 1; i < argc; i++)
+ {
+ if (argv[i][0] != '-')
+ break;
+ if (argv[i][1] == '-') {
+ i++;
+ break;
+ }
+ switch (argv[i][1]) {
+ case 'v':
+ verbose = true;
+ break;
+ default:
+ strip_usage();
+ }
+ }
+ for ( ; i < argc; i++) {
+ char *tmpname = make_tempname(argv[i]);
+ copy_file(argv[i], tmpname);
+ rename(tmpname, argv[i]);
+ }
+ return 0;
+ }
+
for (i = 1; i < argc; i++)
{
if (argv[i][0] == '-') {