This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH [2.10]: accept "strip -d" alias for "strip -g"
- To: binutils at sources dot redhat dot com
- Subject: PATCH [2.10]: accept "strip -d" alias for "strip -g"
- From: Todd Vierling <tv at wasabisystems dot com>
- Date: Thu, 10 Aug 2000 18:23:35 -0400 (EDT)
The historic BSD strip(1) used "-d" to mean the same as objcopy's "-g", aka
--strip-debug. This has been in NetBSD's strip(1) since the dawn of time
(before we switched to the full binutils), and we hacked it into binutils's
strip. Here's a patch to add this back to the binutils sources. This could
be added to strip.1, if desired, next to -S, -g, and --strip-debug, but I
thought this might be better as a hidden compatibility option.
==========
--- binutils/objcopy.c 2000/07/26 00:22:47
+++ binutils/objcopy.c 2000/08/10 19:53:54
@@ -1663,7 +1663,7 @@
struct section_list *p;
char *output_file = NULL;
- while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpgxXVv",
+ while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpdgxXVv",
strip_options, (int *) 0)) != EOF)
{
switch (c)
@@ -1687,6 +1687,7 @@
break;
case 'S':
case 'g':
+ case 'd': /* NetBSD, historic BSD strip */
strip_symbols = STRIP_DEBUG;
break;
case OPTION_STRIP_UNNEEDED:
==========
--
-- Todd Vierling <tv@wasabisystems.com> * http://www.wasabisystems.com/
-- Speed, stability, security, and support. Wasabi NetBSD: Run with it.