]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
2005-08-08 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Tue, 9 Aug 2005 04:58:05 +0000 (04:58 +0000)
committerRoland McGrath <roland@redhat.com>
Tue, 9 Aug 2005 04:58:05 +0000 (04:58 +0000)
* strip.c (options, parse_opt): Grok -R .comment for compatibility
with binutils strip.  Likewise -d, -S, as aliases for -g.
Likewise ignore -s/--strip-all.

src/ChangeLog
src/strip.c

index 812290347560609bcc6d677efab6933e1341281c..a285ac50ab7d5b79d219b46d134fa8435bb42d6b 100644 (file)
@@ -1,3 +1,9 @@
+2005-08-08  Roland McGrath  <roland@redhat.com>
+
+       * strip.c (options, parse_opt): Grok -R .comment for compatibility
+       with binutils strip.  Likewise -d, -S, as aliases for -g.
+       Likewise ignore -s/--strip-all.
+
 2005-08-07  Roland McGrath  <roland@redhat.com>
 
        * strip.c (process_file): Open read-only when using a different output
index 2de5d6b8c69d7de4401df101614d7a8f88c5e091..37f9eb0e089410eafaa4cfbac7ec042cf5345493 100644 (file)
@@ -63,11 +63,15 @@ static const struct argp_option options[] =
   { NULL, 'F', "FILE", 0, N_("Embed name FILE instead of -f argument"), 0 },
 
   { NULL, 0, NULL, 0, N_("Output options:"), 0 },
+  { "strip-all", 's', NULL, OPTION_HIDDEN, NULL, 0 },
   { "strip-debug", 'g', NULL, 0, N_("Remove all debugging symbols"), 0 },
+  { NULL, 'd', NULL, OPTION_ALIAS, NULL, 0 },
+  { NULL, 'S', NULL, OPTION_ALIAS, NULL, 0 },
   { "preserve-dates", 'p', NULL, 0,
     N_("Copy modified/access timestamps to the output"), 0 },
   { "remove-comment", OPT_REMOVE_COMMENT, NULL, 0,
     N_("Remove .comment section"), 0 },
+  { "remove-section", 'R', "SECTION", OPTION_HIDDEN, NULL, 0 },
   { "permissive", OPT_PERMISSIVE, NULL, 0,
     N_("Relax a few rules to handle slightly broken ELF files"), 0 },
   { NULL, 0, NULL, 0, NULL, 0 }
@@ -235,7 +239,20 @@ parse_opt (int key, char *arg,
       remove_comment = true;
       break;
 
+    case 'R':
+      if (!strcmp (arg, ".comment"))
+       remove_comment = true;
+      else
+       {
+         argp_error (state,
+                     gettext ("-R option supports only .comment section"));
+         return EINVAL;
+       }
+      break;
+
     case 'g':
+    case 'd':
+    case 'S':
       remove_debug = true;
       break;
 
@@ -243,6 +260,9 @@ parse_opt (int key, char *arg,
       permissive = true;
       break;
 
+    case 's':                  /* Ignored for compatibility.  */
+      break;
+
     default:
       return ARGP_ERR_UNKNOWN;
     }