diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2020-11-06 06:04:32 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2020-11-06 06:04:41 -0800 |
commit | 9c905051aaa48bd07f243c1ed502fc88dbf1f3bb (patch) | |
tree | d5531a71c430c19ff0c0ccc3134586843008d65e /binutils | |
parent | af1bd771fc1e719df4c834f9f2d12b879a9de712 (diff) | |
download | gdb-9c905051aaa48bd07f243c1ed502fc88dbf1f3bb.zip gdb-9c905051aaa48bd07f243c1ed502fc88dbf1f3bb.tar.gz gdb-9c905051aaa48bd07f243c1ed502fc88dbf1f3bb.tar.bz2 |
elfedit: Update help message
Update elfedit message to
$ elfedit --help
Usage: elfedit <option(s)> elffile(s)
Update the ELF header of ELF files
The options are:
--input-mach [none|i386|iamcu|l1om|k1om|x86_64]
Set input machine type
--output-mach [none|i386|iamcu|l1om|k1om|x86_64]
Set output machine type
--input-type [none|rel|exec|dyn]
Set input file type
--output-type [none|rel|exec|dyn]
Set output file type
--input-osabi [none|HPUX|NetBSD|GNU|Linux|Solaris|AIX|Irix|FreeBSD|TRU64|Modesto|OpenBSD|OpenVMS|NSK|AROS|FenixOS]
Set input OSABI
--output-osabi [none|HPUX|NetBSD|GNU|Linux|Solaris|AIX|Irix|FreeBSD|TRU64|Modesto|OpenBSD|OpenVMS|NSK|AROS|FenixOS]
Set output OSABI
--enable-x86-feature [ibt|shstk]
Enable x86 feature
--disable-x86-feature [ibt|shstk]
Disable x86 feature
-h --help Display this information
-v --version Display the version number of elfedit
Report bugs to <http://www.sourceware.org/bugzilla/>
* elfedit.c: Include "libiberty.h".
(usage): Update help message.
Diffstat (limited to 'binutils')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/elfedit.c | 38 |
2 files changed, 33 insertions, 10 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 3d6732f..2aa6a32 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2020-11-06 H.J. Lu <hongjiu.lu@intel.com> + + * elfedit.c: Include "libiberty.h". + (usage): Update help message. + 2020-11-03 Howard Chu <hyc@symas.com> * ar.c (long_options): Add --record-libdeps. diff --git a/binutils/elfedit.c b/binutils/elfedit.c index 91cba1d..5fffe84 100644 --- a/binutils/elfedit.c +++ b/binutils/elfedit.c @@ -20,6 +20,7 @@ #include "config.h" #include "sysdep.h" +#include "libiberty.h" #include <assert.h> #if __GNUC__ >= 2 @@ -893,23 +894,39 @@ static struct option options[] = ATTRIBUTE_NORETURN static void usage (FILE *stream, int exit_status) { + unsigned int i; + char *osabi; + + for (i = 0; i < ARRAY_SIZE (osabis); i++) + if (i == 0) + osabi = concat (osabis[i].name, NULL); + else + osabi = concat (osabi, "|", osabis[i].name, NULL); + fprintf (stream, _("Usage: %s <option(s)> elffile(s)\n"), program_name); fprintf (stream, _(" Update the ELF header of ELF files\n")); fprintf (stream, _(" The options are:\n")); fprintf (stream, _("\ - --input-mach <machine> Set input machine type to <machine>\n\ - --output-mach <machine> Set output machine type to <machine>\n\ - --input-type <type> Set input file type to <type>\n\ - --output-type <type> Set output file type to <type>\n\ - --input-osabi <osabi> Set input OSABI to <osabi>\n\ - --output-osabi <osabi> Set output OSABI to <osabi>\n")); + --input-mach [none|i386|iamcu|l1om|k1om|x86_64]\n\ + Set input machine type\n\ + --output-mach [none|i386|iamcu|l1om|k1om|x86_64]\n\ + Set output machine type\n\ + --input-type [none|rel|exec|dyn]\n\ + Set input file type\n\ + --output-type [none|rel|exec|dyn]\n\ + Set output file type\n\ + --input-osabi [%s]\n\ + Set input OSABI\n\ + --output-osabi [%s]\n\ + Set output OSABI\n"), + osabi, osabi); #ifdef HAVE_MMAP fprintf (stream, _("\ - --enable-x86-feature <feature>\n\ - Enable x86 feature <feature>\n\ - --disable-x86-feature <feature>\n\ - Disable x86 feature <feature>\n")); + --enable-x86-feature [ibt|shstk]\n\ + Enable x86 feature\n\ + --disable-x86-feature [ibt|shstk]\n\ + Disable x86 feature\n")); #endif fprintf (stream, _("\ -h --help Display this information\n\ @@ -918,6 +935,7 @@ usage (FILE *stream, int exit_status) program_name); if (REPORT_BUGS_TO[0] && exit_status == 0) fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO); + free (osabi); exit (exit_status); } |