From d5bcb29dda5871177ab3be9f78cacb5945bec4df Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 22 Nov 1999 09:42:42 +0000 Subject: [PATCH] Overhaul --help output. --- binutils/ChangeLog | 5 +++ binutils/objcopy.c | 96 +++++++++++++++++++++++++++++++--------------- 2 files changed, 70 insertions(+), 31 deletions(-) diff --git a/binutils/ChangeLog b/binutils/ChangeLog index ae0b27cfe22..bb146788213 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +1999-11-22 Nick Clifton + + * objcopy.c (copy_usage): Reformat. + (strip_usage): Reformat. + 1999-11-21 Nick Clifton * objdump.c (usage): Overhaul output: One line per switch. diff --git a/binutils/objcopy.c b/binutils/objcopy.c index f2455baf650..37b12e7ba51 100644 --- a/binutils/objcopy.c +++ b/binutils/objcopy.c @@ -293,31 +293,52 @@ copy_usage (stream, exit_status) FILE *stream; int exit_status; { + fprintf (stream, _("Usage: %s in-file [out-file]\n"), program_name); + fprintf (stream, _(" The switches are:\n")); fprintf (stream, _("\ -Usage: %s [-vVSpgxX] [-I bfdname] [-O bfdname] [-F bfdname] [-b byte]\n\ - [-j section] [-R section]\n\ - [-i interleave] [--interleave=interleave] [--byte=byte]\n\ - [--input-target=bfdname] [--output-target=bfdname] [--target=bfdname]\n\ - [--strip-all] [--strip-debug] [--strip-unneeded] [--discard-all]\n\ - [--discard-locals] [--debugging]\n\ - [--only-section=section] [--remove-section=section]\n"), - program_name); - fprintf (stream, _("\ - [--gap-fill=val] [--pad-to=address] [--preserve-dates]\n\ - [--set-start=val] \n\ - [--change-start=incr] [--change-addresses=incr] \n\ - (--adjust-start and --adjust-vma are aliases for these two) \n\ - [--change-section-address=section{=,+,-}val]\n\ - (--adjust-section-vma is an alias for --change-section-address)\n\ - [--change-section-lma=section{=,+,-}val]\n\ - [--change-section-vma=section{=,+,-}val]\n\ - [--adjust-warnings] [--no-adjust-warnings]\n\ - [--change-warnings] [--no-change-warnings]\n\ - [--set-section-flags=section=flags] [--add-section=sectionname=filename]\n\ - [--keep-symbol symbol] [-K symbol] [--strip-symbol symbol] [-N symbol]\n\ - [--localize-symbol symbol] [-L symbol] [--weaken-symbol symbol]\n\ - [-W symbol] [--change-leading-char] [--remove-leading-char] [--weaken]\n\ - [--verbose] [--version] [--help] in-file [out-file]\n")); + -I --input-target Assume input file is in format \n\ + -O --output-target Create an output file in format \n\ + -F --target Set both input and output format to \n\ + --debugging Convert debugging information, if possible\n\ + -p --preserve-dates Copy modified/access timestamps to the output\n\ + -j --only-section Only copy section into the output\n\ + -R --remove-section Remove section from the output\n\ + -S --strip-all Remove all symbol and relocation information\n\ + -g --strip-debug Remove all debugging symbols\n\ + --strip-unneeded Remove all symbols not needed by relocations\n\ + -N --strip-symbol Do not copy symbol \n\ + -K --keep-symbol Only copy symbol \n\ + -L --localize-symbol Force symbol to be marked as a local\n\ + -W --weaken-symbol Force symbol to be marked as a weak\n\ + --weaken Force all global symbols to be marked as weak\n\ + -x --discard-all Remove all non-global symbols\n\ + -X --discard-locals Remove any compiler-generated symbols\n\ + -i --interleave Only copy one out of every bytes\n\ + -b --byte Select byte in every interleaved block\n\ + --gap-fill Fill gaps between sections with \n\ + --pad-to Pad the last section up to address \n\ + --set-start Set the start address to \n\ + {--change-start|--adjust-start} \n\ + Add to the start address\n\ + {--change-addresses|--adjust-vma} \n\ + Add to LMA, VMA and start addresses\n\ + {--change-section-address|--adjust-section-vma} {=|+|-}\n\ + Change LMA and VMA of section by \n\ + --change-section-lma {=|+|-}\n\ + Change the LMA of section by \n\ + --change-section-vma {=|+|-}\n\ + Change the VMA of section by \n\ + {--[no-]change-warnings|--[no-]adjust-warnings}\n\ + Warn if a named section does not exist\n\ + --set-section-flags =\n\ + Set section 's properties to \n\ + --add-section = Add section found in 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); if (exit_status == 0) fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n")); @@ -329,14 +350,27 @@ strip_usage (stream, exit_status) FILE *stream; int exit_status; { + fprintf (stream, _("Usage: %s in-file(s)\n"), program_name); + fprintf (stream, _(" The switches are:\n")); fprintf (stream, _("\ -Usage: %s [-vVsSpgxX] [-I bfdname] [-O bfdname] [-F bfdname] [-R section]\n\ - [--input-target=bfdname] [--output-target=bfdname] [--target=bfdname]\n\ - [--strip-all] [--strip-debug] [--strip-unneeded] [--discard-all]\n\ - [--discard-locals] [--keep-symbol symbol] [-K symbol]\n\ - [--strip-symbol symbol] [-N symbol] [--remove-section=section]\n\ - [-o file] [--preserve-dates] [--verbose] [--version] [--help] file...\n"), - program_name); + -I --input-target Assume input file is in format \n\ + -O --output-target Create an output file in format \n\ + -F --target Set both input and output format to \n\ + -p --preserve-dates Copy modified/access timestamps to the output\n\ + -R --remove-section Remove section from the output\n\ + -s --strip-all Remove all symbol and relocation information\n\ + -g -S --strip-debug Remove all debugging symbols\n\ + --strip-unneeded Remove all symbols not needed by relocations\n\ + -N --strip-symbol Do not copy symbol \n\ + -K --keep-symbol Only copy symbol \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 Place stripped output into \n\ +")); + list_supported_targets (program_name, stream); if (exit_status == 0) fprintf (stream, _("Report bugs to bug-gnu-utils@gnu.org\n")); -- 2.30.2