Overhaul --help output.

This commit is contained in:
Nick Clifton 1999-11-22 09:42:42 +00:00
parent 1dada9c5d3
commit d5bcb29dda
2 changed files with 70 additions and 31 deletions

View File

@ -1,3 +1,8 @@
1999-11-22 Nick Clifton <nickc@cygnus.com>
* objcopy.c (copy_usage): Reformat.
(strip_usage): Reformat.
1999-11-21 Nick Clifton <nickc@cygnus.com> 1999-11-21 Nick Clifton <nickc@cygnus.com>
* objdump.c (usage): Overhaul output: One line per switch. * objdump.c (usage): Overhaul output: One line per switch.

View File

@ -293,31 +293,52 @@ copy_usage (stream, exit_status)
FILE *stream; FILE *stream;
int exit_status; int exit_status;
{ {
fprintf (stream, _("Usage: %s <switches> in-file [out-file]\n"), program_name);
fprintf (stream, _(" The switches are:\n"));
fprintf (stream, _("\ fprintf (stream, _("\
Usage: %s [-vVSpgxX] [-I bfdname] [-O bfdname] [-F bfdname] [-b byte]\n\ -I --input-target <bfdname> Assume input file is in format <bfdname>\n\
[-j section] [-R section]\n\ -O --output-target <bfdname> Create an output file in format <bfdname>\n\
[-i interleave] [--interleave=interleave] [--byte=byte]\n\ -F --target <bfdname> Set both input and output format to <bfdname>\n\
[--input-target=bfdname] [--output-target=bfdname] [--target=bfdname]\n\ --debugging Convert debugging information, if possible\n\
[--strip-all] [--strip-debug] [--strip-unneeded] [--discard-all]\n\ -p --preserve-dates Copy modified/access timestamps to the output\n\
[--discard-locals] [--debugging]\n\ -j --only-section <name> Only copy section <name> into the output\n\
[--only-section=section] [--remove-section=section]\n"), -R --remove-section <name> Remove section <name> from the output\n\
program_name); -S --strip-all Remove all symbol and relocation information\n\
fprintf (stream, _("\ -g --strip-debug Remove all debugging symbols\n\
[--gap-fill=val] [--pad-to=address] [--preserve-dates]\n\ --strip-unneeded Remove all symbols not needed by relocations\n\
[--set-start=val] \n\ -N --strip-symbol <name> Do not copy symbol <name>\n\
[--change-start=incr] [--change-addresses=incr] \n\ -K --keep-symbol <name> Only copy symbol <name>\n\
(--adjust-start and --adjust-vma are aliases for these two) \n\ -L --localize-symbol <name> Force symbol <name> to be marked as a local\n\
[--change-section-address=section{=,+,-}val]\n\ -W --weaken-symbol <name> Force symbol <name> to be marked as a weak\n\
(--adjust-section-vma is an alias for --change-section-address)\n\ --weaken Force all global symbols to be marked as weak\n\
[--change-section-lma=section{=,+,-}val]\n\ -x --discard-all Remove all non-global symbols\n\
[--change-section-vma=section{=,+,-}val]\n\ -X --discard-locals Remove any compiler-generated symbols\n\
[--adjust-warnings] [--no-adjust-warnings]\n\ -i --interleave <number> Only copy one out of every <number> bytes\n\
[--change-warnings] [--no-change-warnings]\n\ -b --byte <num> Select byte <num> in every interleaved block\n\
[--set-section-flags=section=flags] [--add-section=sectionname=filename]\n\ --gap-fill <val> Fill gaps between sections with <val>\n\
[--keep-symbol symbol] [-K symbol] [--strip-symbol symbol] [-N symbol]\n\ --pad-to <addr> Pad the last section up to address <addr>\n\
[--localize-symbol symbol] [-L symbol] [--weaken-symbol symbol]\n\ --set-start <addr> Set the start address to <addr>\n\
[-W symbol] [--change-leading-char] [--remove-leading-char] [--weaken]\n\ {--change-start|--adjust-start} <incr>\n\
[--verbose] [--version] [--help] in-file [out-file]\n")); Add <incr> to the start address\n\
{--change-addresses|--adjust-vma} <incr>\n\
Add <incr> to LMA, VMA and start addresses\n\
{--change-section-address|--adjust-section-vma} <name>{=|+|-}<val>\n\
Change LMA and VMA of section <name> by <val>\n\
--change-section-lma <name>{=|+|-}<val>\n\
Change the LMA of section <name> by <val>\n\
--change-section-vma <name>{=|+|-}<val>\n\
Change the VMA of section <name> by <val>\n\
{--[no-]change-warnings|--[no-]adjust-warnings}\n\
Warn if a named section does not exist\n\
--set-section-flags <name>=<flags>\n\
Set section <name>'s properties to <flags>\n\
--add-section <name>=<file> Add section <name> found in <file> to output\n\
--change-leading-char Force output format's leading character style\n\
--remove-leading-char Remove leading character from global symbols\n\
-v --verbose List all object files modified\n\
-V --version Display this program's version number\n\
-h --help Display this output\n\
"));
list_supported_targets (program_name, stream); list_supported_targets (program_name, stream);
if (exit_status == 0) if (exit_status == 0)
fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n")); fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n"));
@ -329,14 +350,27 @@ strip_usage (stream, exit_status)
FILE *stream; FILE *stream;
int exit_status; int exit_status;
{ {
fprintf (stream, _("Usage: %s <switches> in-file(s)\n"), program_name);
fprintf (stream, _(" The switches are:\n"));
fprintf (stream, _("\ fprintf (stream, _("\
Usage: %s [-vVsSpgxX] [-I bfdname] [-O bfdname] [-F bfdname] [-R section]\n\ -I --input-target <bfdname> Assume input file is in format <bfdname>\n\
[--input-target=bfdname] [--output-target=bfdname] [--target=bfdname]\n\ -O --output-target <bfdname> Create an output file in format <bfdname>\n\
[--strip-all] [--strip-debug] [--strip-unneeded] [--discard-all]\n\ -F --target <bfdname> Set both input and output format to <bfdname>\n\
[--discard-locals] [--keep-symbol symbol] [-K symbol]\n\ -p --preserve-dates Copy modified/access timestamps to the output\n\
[--strip-symbol symbol] [-N symbol] [--remove-section=section]\n\ -R --remove-section <name> Remove section <name> from the output\n\
[-o file] [--preserve-dates] [--verbose] [--version] [--help] file...\n"), -s --strip-all Remove all symbol and relocation information\n\
program_name); -g -S --strip-debug Remove all debugging symbols\n\
--strip-unneeded Remove all symbols not needed by relocations\n\
-N --strip-symbol <name> Do not copy symbol <name>\n\
-K --keep-symbol <name> Only copy symbol <name>\n\
-x --discard-all Remove all non-global symbols\n\
-X --discard-locals Remove any compiler-generated symbols\n\
-v --verbose List all object files modified\n\
-V --version Display this program's version number\n\
-h --help Display this output\n\
-o <file> Place stripped output into <file>\n\
"));
list_supported_targets (program_name, stream); list_supported_targets (program_name, stream);
if (exit_status == 0) if (exit_status == 0)
fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n")); fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n"));