From 07012eeef27d34424bd51d1ee54bbeb09841fe1f Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Mon, 3 Oct 2005 19:37:44 +0000 Subject: [PATCH] * addr2line.c (usage): Document @file. * ar.c (usage): Likewise. * coffdump (usage): Likewise. * cxxfilt.c (usage): Likewise. * dlltool.c (usage): Likewise. * dllwrap.c (usage): Likewise. * nlmconv.c (usage): Likewise. * nm.c (usage): Likewise. * objcopy.c (usage): Likewise. * objdump.c (usage): Likewise. * readelf.c (usage): Likewise. * size.c (usage): Likeise. * srconv.c (usage): Likewise. * strings.c (usage): Likewise. * windres.c (usage): Likewise. * doc/binutils.texi: Add section on common options. --- binutils/ChangeLog | 19 +++++++++++++++++++ binutils/addr2line.c | 1 + binutils/ar.c | 4 +++- binutils/coffdump.c | 1 + binutils/cxxfilt.c | 2 +- binutils/dlltool.c | 1 + binutils/dllwrap.c | 1 + binutils/doc/binutils.texi | 30 ++++++++++++++++++++++++++++++ binutils/nlmconv.c | 1 + binutils/nm.c | 1 + binutils/objcopy.c | 1 + binutils/objdump.c | 1 + binutils/readelf.c | 1 + binutils/size.c | 1 + binutils/srconv.c | 1 + binutils/strings.c | 1 + binutils/windres.c | 1 + 17 files changed, 66 insertions(+), 2 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 4eaf26f6b89..f7171c86669 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,22 @@ +2005-10-03 Mark Mitchell + + * addr2line.c (usage): Document @file. + * ar.c (usage): Likewise. + * coffdump (usage): Likewise. + * cxxfilt.c (usage): Likewise. + * dlltool.c (usage): Likewise. + * dllwrap.c (usage): Likewise. + * nlmconv.c (usage): Likewise. + * nm.c (usage): Likewise. + * objcopy.c (usage): Likewise. + * objdump.c (usage): Likewise. + * readelf.c (usage): Likewise. + * size.c (usage): Likeise. + * srconv.c (usage): Likewise. + * strings.c (usage): Likewise. + * windres.c (usage): Likewise. + * doc/binutils.texi: Add section on common options. + 2005-10-03 H.J. Lu * NEWS: Mention -W/--dwarf. diff --git a/binutils/addr2line.c b/binutils/addr2line.c index 7b9550da8ef..aae69ca3be5 100644 --- a/binutils/addr2line.c +++ b/binutils/addr2line.c @@ -77,6 +77,7 @@ usage (FILE *stream, int status) fprintf (stream, _(" Convert addresses into line number/file name pairs.\n")); fprintf (stream, _(" If no addresses are specified on the command line, they will be read from stdin\n")); fprintf (stream, _(" The options are:\n\ + @ Read options from \n\ -b --target= Set the binary file format\n\ -e --exe= Set the input file name (default is a.out)\n\ -i --inlines Unwind inlined functions\n\ diff --git a/binutils/ar.c b/binutils/ar.c index 10c62bfb5af..fe1c6402222 100644 --- a/binutils/ar.c +++ b/binutils/ar.c @@ -242,7 +242,8 @@ usage (int 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, _(" @ - read options from \n")); + ar_emul_usage (s); } else @@ -251,6 +252,7 @@ usage (int help) fprintf (s, _("Usage: %s [options] archive\n"), program_name); fprintf (s, _(" Generate an index to speed access to archives\n")); fprintf (s, _(" The options are:\n\ + @ Read options from \n\ -h --help Print this help message\n\ -V --version Print version information\n")); } diff --git a/binutils/coffdump.c b/binutils/coffdump.c index 4361295a1df..5ec23b43f62 100644 --- a/binutils/coffdump.c +++ b/binutils/coffdump.c @@ -457,6 +457,7 @@ show_usage (FILE *file, int status) fprintf (file, _("Usage: %s [option(s)] in-file\n"), program_name); fprintf (file, _(" Print a human readable interpretation of a SYSROFF object file\n")); fprintf (file, _(" The options are:\n\ + @ Read options from \n\ -h --help Display this information\n\ -v --version Display the program's version\n\ \n")); diff --git a/binutils/cxxfilt.c b/binutils/cxxfilt.c index f0a3a9e5ba3..a0e0a075940 100644 --- a/binutils/cxxfilt.c +++ b/binutils/cxxfilt.c @@ -88,7 +88,7 @@ Usage: %s [-_] [-n] [--strip-underscores] [--no-strip-underscores]\n\ fprintf (stream, "]\n"); fprintf (stream, "\ - [--help] [--version] [arg...]\n"); + [@file] [--help] [--version] [arg...]\n"); exit (status); } diff --git a/binutils/dlltool.c b/binutils/dlltool.c index bcecc8acded..d8bb03c0a8b 100644 --- a/binutils/dlltool.c +++ b/binutils/dlltool.c @@ -3058,6 +3058,7 @@ usage (FILE *file, int status) fprintf (file, _(" -v --verbose Be verbose.\n")); fprintf (file, _(" -V --version Display the program version.\n")); fprintf (file, _(" -h --help Display this information.\n")); + fprintf (file, _(" @ Read options from .\n")); #ifdef DLLTOOL_MCORE_ELF fprintf (file, _(" -M --mcore-elf Process mcore-elf object files into .\n")); fprintf (file, _(" -L --linker Use as the linker.\n")); diff --git a/binutils/dllwrap.c b/binutils/dllwrap.c index 1c953d36af5..f93c75d6fb3 100644 --- a/binutils/dllwrap.c +++ b/binutils/dllwrap.c @@ -473,6 +473,7 @@ usage (FILE *file, int status) { fprintf (file, _("Usage %s \n"), prog_name); fprintf (file, _(" Generic options:\n")); + fprintf (file, _(" @ Read options from \n")); fprintf (file, _(" --quiet, -q Work quietly\n")); fprintf (file, _(" --verbose, -v Verbose\n")); fprintf (file, _(" --version Print dllwrap version\n")); diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index 313a878fb34..8c8e5dc8e44 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -166,6 +166,7 @@ section entitled "GNU Free Documentation License". * nlmconv:: Converts object code into an NLM * windres:: Manipulate Windows resources * dlltool:: Create files needed to build and use DLLs +* Common Options:: Command-line options for all utilities * Selecting The Target System:: How these utilities determine the target. * Reporting Bugs:: Reporting Bugs * GNU Free Documentation License:: GNU Free Documentation License @@ -3434,6 +3435,35 @@ objdump(1), and the Info entries for @file{binutils}. @c man end @end ignore +@node Common Options +@chapter Common Options + +The following command-line options are supported by all of the +programs described in this manual. + +@table @env +@item @@@var{file} +Read command-line options from @var{file}. The options read are +inserted in place of the original @@@var{file} option. If @var{file} +does not exist, or cannot be read, then the option will be treated +literally, and not removed. + +Options in @var{file} are separated by whitespace. A whitespace +character may be included in an option by surrounding the entire +option in either single or double quotes. Any character (including a +backslash) may be included by prefixing the character to be included +character with a backslash. The @var{file} may itself contain +additional @@@var{file} options; any such options will be processed +recursively. + +@item --help +Display the command-line options supported by the program. + +@item --version +Display the version number of the program. + +@end table + @node Selecting The Target System @chapter Selecting the Target System diff --git a/binutils/nlmconv.c b/binutils/nlmconv.c index 55bccebcb68..551e7e59e43 100644 --- a/binutils/nlmconv.c +++ b/binutils/nlmconv.c @@ -1105,6 +1105,7 @@ show_usage (FILE *file, int status) -T --header-file= Read for NLM header information\n\ -l --linker= Use for any linking\n\ -d --debug Display on stderr the linker command line\n\ + @ Read options from .\n\ -h --help Display this information\n\ -v --version Display the program's version\n\ ")); diff --git a/binutils/nm.c b/binutils/nm.c index c47e99e581b..c1fb4d803e8 100644 --- a/binutils/nm.c +++ b/binutils/nm.c @@ -254,6 +254,7 @@ usage (FILE *stream, int status) --target=BFDNAME Specify the target object format as BFDNAME\n\ -u, --undefined-only Display only undefined symbols\n\ -X 32_64 (ignored)\n\ + @FILE Read options from FILE\n\ -h, --help Display this information\n\ -V, --version Display this program's version number\n\ \n")); diff --git a/binutils/objcopy.c b/binutils/objcopy.c index 496d4bf6f61..d46d0936f7f 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -476,6 +476,7 @@ copy_usage (FILE *stream, int exit_status) Add to start of every allocatable\n\ section name\n\ -v --verbose List all object files modified\n\ + @ Read options from \n\ -V --version Display this program's version number\n\ -h --help Display this output\n\ --info List object formats & architectures supported\n\ diff --git a/binutils/objdump.c b/binutils/objdump.c index e5db6615741..f2b5eea0128 100644 --- a/binutils/objdump.c +++ b/binutils/objdump.c @@ -196,6 +196,7 @@ usage (FILE *stream, int status) -T, --dynamic-syms Display the contents of the dynamic symbol table\n\ -r, --reloc Display the relocation entries in the file\n\ -R, --dynamic-reloc Display the dynamic relocation entries in the file\n\ + @ Read options from \n\ -v, --version Display this program's version number\n\ -i, --info List object formats and architectures supported\n\ -H, --help Display this information\n\ diff --git a/binutils/readelf.c b/binutils/readelf.c index debde024b11..04e69d6976c 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -2616,6 +2616,7 @@ usage (void) fprintf (stdout, _("\ -I --histogram Display histogram of bucket list lengths\n\ -W --wide Allow output width to exceed 80 characters\n\ + @ Read options from \n\ -H --help Display this information\n\ -v --version Display the version number of readelf\n")); fprintf (stdout, _("Report bugs to %s\n"), REPORT_BUGS_TO); diff --git a/binutils/size.c b/binutils/size.c index 4bc1bf60757..b78cba02ba0 100644 --- a/binutils/size.c +++ b/binutils/size.c @@ -87,6 +87,7 @@ usage (FILE *stream, int status) -o|-d|-x --radix={8|10|16} Display numbers in octal, decimal or hex\n\ -t --totals Display the total sizes (Berkeley only)\n\ --target= Set the binary file format\n\ + @ Read options from \n\ -h --help Display this information\n\ -v --version Display the program's version\n\ \n"), diff --git a/binutils/srconv.c b/binutils/srconv.c index e6f35ca15fe..d1f3efdb9e0 100644 --- a/binutils/srconv.c +++ b/binutils/srconv.c @@ -1724,6 +1724,7 @@ show_usage (FILE *file, int status) -q --quick (Obsolete - ignored)\n\ -n --noprescan Do not perform a scan to convert commons into defs\n\ -d --debug Display information about what is being done\n\ + @ Read options from \n\ -h --help Display this information\n\ -v --version Print the program's version number\n")); diff --git a/binutils/strings.c b/binutils/strings.c index 14f919422ef..a04cb581eae 100644 --- a/binutils/strings.c +++ b/binutils/strings.c @@ -717,6 +717,7 @@ usage (FILE *stream, int status) -T --target= Specify the binary file format\n\ -e --encoding={s,S,b,l,B,L} Select character size and endianness:\n\ s = 7-bit, S = 8-bit, {b,l} = 16-bit, {B,L} = 32-bit\n\ + @ Read options from \n\ -h --help Display this information\n\ -v --version Print the program's version number\n")); list_supported_targets (program_name, stream); diff --git a/binutils/windres.c b/binutils/windres.c index 5f5836ca84e..50af427d0f3 100644 --- a/binutils/windres.c +++ b/binutils/windres.c @@ -659,6 +659,7 @@ usage (FILE *stream, int status) #endif fprintf (stream, _("\ -r Ignored for compatibility with rc\n\ + @ Read options from \n\ -h --help Print this help message\n\ -V --version Print version information\n")); fprintf (stream, _("\ -- 2.30.2