This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Fix PR12590, ranlib -t
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Thu, 17 Mar 2011 23:25:40 +1030
- Subject: Fix PR12590, ranlib -t
PR 12590
* ar.c (ranlib_main): Init arg_index properly.
(usage): Describe --target.
Index: binutils/ar.c
===================================================================
RCS file: /cvs/src/src/binutils/ar.c,v
retrieving revision 1.72
diff -u -p -r1.72 ar.c
--- binutils/ar.c 8 Dec 2010 05:05:30 -0000 1.72
+++ binutils/ar.c 17 Mar 2011 12:52:11 -0000
@@ -1,6 +1,6 @@
/* ar.c - Archive modify and extract.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -290,6 +290,7 @@ usage (int help)
fprintf (s, _(" [v] - be verbose\n"));
fprintf (s, _(" [V] - display the version number\n"));
fprintf (s, _(" @<file> - read options from <file>\n"));
+ fprintf (s, _(" --target=BFDNAME - specify the target object format as BFDNAME\n"));
#if BFD_SUPPORTS_PLUGINS
fprintf (s, _(" optional:\n"));
fprintf (s, _(" --plugin <p> - load the specified plugin\n"));
@@ -585,7 +586,7 @@ ranlib_main (int argc, char **argv)
if (show_version)
print_version ("ranlib");
- arg_index = 1;
+ arg_index = optind;
while (arg_index < argc)
{
--
Alan Modra
Australia Development Lab, IBM