* readelf.c: Add missing prototypes.
[deliverable/binutils-gdb.git] / binutils / ar.c
index c8179d469b33f69a687281d45a9c1e9c2beb6a81..996476ce460ef15a3352e951fec77336ab252fe5 100644 (file)
@@ -1,5 +1,5 @@
 /* ar.c - Archive modify and extract.
-   Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
    Free Software Foundation, Inc.
 
 This file is part of GNU Binutils.
@@ -250,7 +250,7 @@ usage (help)
   if (! is_ranlib)
     {
       /* xgettext:c-format */
-      fprintf (s, _("Usage: %s [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n"),
+      fprintf (s, _("Usage: %s [-X32_64] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] archive-file file...\n"),
               program_name);
       /* xgettext:c-format */
       fprintf (s, _("       %s -M [<mri-script]\n"), program_name);
@@ -276,6 +276,7 @@ usage (help)
       fprintf (s, _("  [S]          - do not build a symbol table\n"));
       fprintf (s, _("  [v]          - be verbose\n"));
       fprintf (s, _("  [V]          - display the version number\n"));
+      fprintf (s, _("  [-X32_64]    - (ignored)\n"));
     }
   else
     /* xgettext:c-format */
@@ -310,7 +311,7 @@ normalize (file, abfd)
     if (filename == NULL || (bslash != NULL && bslash > filename))
       filename = bslash;
     if (filename == NULL && file[0] != '\0' && file[1] == ':')
-      filename = file + 2;
+      filename = file + 1;
   }
 #endif
   if (filename != (char *) NULL)
@@ -395,7 +396,7 @@ main (argc, argv)
          if (temp == NULL || (bslash != NULL && bslash > temp))
            temp = bslash;
          if (temp == NULL && program_name[0] != '\0' && program_name[1] == ':')
-           temp = program_name + 2;
+           temp = program_name + 1;
        }
 #endif
       if (temp == NULL)
@@ -431,6 +432,17 @@ main (argc, argv)
 
   xatexit (remove_output);
 
+  /* Ignored for (partial) AIX compatibility.  On AIX,
+     the -X option can be used to ignore certain kinds
+     of object files in the archive (the 64-bit objects
+     or the 32-bit objects).  GNU ar always looks at all
+     kinds of objects in an archive.  */
+  while (argc > 1 && strcmp (argv[1], "-X32_64") == 0)
+    {
+      argv++;
+      argc--;
+    }
+
   if (is_ranlib)
     {
       boolean touch = false;
This page took 0.024163 seconds and 4 git commands to generate.