]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Correct previous fix for an absence of input files on the ar command line, so that...
authorNick Clifton <nickc@redhat.com>
Mon, 17 Jul 2017 09:51:45 +0000 (10:51 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 17 Jul 2017 09:51:45 +0000 (10:51 +0100)
PR 21433
* ar.c (main): Skip check for no files on the command line when
running in MRI mode.

binutils/ChangeLog
binutils/ar.c

index 19de4a0009486d950c4113eb11d9af9514ae78a4..f1400dcbb7b9129c985b38f7827527603f62374e 100644 (file)
@@ -1,3 +1,9 @@
+2017-07-17  Nick Clifton  <nickc@redhat.com>
+
+       PR 21433
+       * ar.c (main): Skip check for no files on the command line when
+       running in MRI mode.
+
 2017-07-13  H.J. Lu  <hongjiu.lu@intel.com>
 
        * testsuite/binutils-all/objdump.exp: Always delete $testarchive
index ef8b5bdb12bede18c47f65e2615b9e0ade8f9a56..25f3b3d0bf0318af1279314a2a40c5b840a96bf0 100644 (file)
@@ -738,9 +738,6 @@ main (int argc, char **argv)
 
   arg_index = 0;
 
-  if (argv[arg_index] == NULL)
-    usage (0);
-
   if (mri_mode)
     {
       default_deterministic ();
@@ -750,6 +747,12 @@ main (int argc, char **argv)
     {
       bfd *arch;
 
+      /* Fail if no files are specified on the command line.
+        (But not for MRI mode which allows for reading arguments
+        and filenames from stdin).  */
+      if (argv[arg_index] == NULL)
+       usage (0);
+
       /* We don't use do_quick_append any more.  Too many systems
         expect ar to always rebuild the symbol table even when q is
         used.  */