PR25079, "ar s" stopped working
authorAlan Modra <amodra@gmail.com>
Tue, 8 Oct 2019 13:41:28 +0000 (00:11 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 8 Oct 2019 13:50:28 +0000 (00:20 +1030)
's' is both a command and a modifier.  If given as a command then we
aren't lacking an operation.  I think the same goes when mri mode is
selected: any following command line used to be ignored.

PR 25079
* ar.c (decode_options): Don't try for command options if
write_armap or mri_mode is selected.

binutils/ChangeLog
binutils/ar.c

index b9e2fcf1a46b0245a709cb56f464812705cda2df..1761d80ef5f0f6487b82c97c8b7df3bf13d2ddee 100644 (file)
@@ -1,3 +1,9 @@
+2019-10-09  Alan Modra  <amodra@gmail.com>
+
+       PR 25079
+       * ar.c (decode_options): Don't try for command options if
+       write_armap or mri_mode is selected.
+
 2019-10-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
 
        * readelf.c (display_msp430_gnu_attribute): New.
index 6bac862bc73dacba6c321aac9dbeb54ba2efbe72..b99afff1c7e180d1bd63f07d5326c90691b0f48c 100644 (file)
@@ -602,7 +602,8 @@ decode_options (int argc, char **argv)
   /* PR 13256: Allow for the possibility that the first command line option
      started with a dash (eg --plugin) but then the following option(s) are
      old style, non-dash-prefixed versions.  */
-  if (operation == none && optind > 0 && optind < argc)
+  if (operation == none && write_armap != 1 && !mri_mode
+      && optind > 0 && optind < argc)
     {
       argv += (optind - 1);
       argc -= (optind - 1);
This page took 0.026872 seconds and 4 git commands to generate.