diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2010-01-06 16:52:15 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2010-01-06 16:52:15 +0000 |
commit | 30fd33bb933183e837b6709e189f1122333b95e2 (patch) | |
tree | 49af8a2936554dece7892b1366450011e37651e8 /binutils/doc | |
parent | e3e535bc5863ec5a183bfaabcd5d1d36a129305a (diff) | |
download | gdb-30fd33bb933183e837b6709e189f1122333b95e2.zip gdb-30fd33bb933183e837b6709e189f1122333b95e2.tar.gz gdb-30fd33bb933183e837b6709e189f1122333b95e2.tar.bz2 |
Add elfedit
binutils/
2010-01-06 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/11131
* Makefile.am (ELFEDIT_PROG): New.
(bin_PROGRAMS): Add $(ELFEDIT_PROG).
(CFILES): Add elfedit.c.
(elfedit_DEPENDENCIES): New.
(elfedit_SOURCES): Likewise.
(elfedit_LDADD): Likewise.
* Makefile.in: Regenerated.
* elfedit.c: New.
* doc/binutils.texi: Document elfedit.
* doc/Makefile.am (man_MANS): Add elfedit.1.
(elfedit.1): New.
* doc/Makefile.in: Regenerated.
binutils/testsuite/
2010-01-06 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/11131
* binutils-all/elfedit-1.d: New.
* binutils-all/elfedit.exp: Likewise.
* config/default.exp (ELFEDIT): New. Set if it doesn't exist.
(ELFEDITFLAGS): Likewise.
* lib/utils-lib.exp (run_dump_test): Support elfedit.
Diffstat (limited to 'binutils/doc')
-rw-r--r-- | binutils/doc/Makefile.am | 8 | ||||
-rw-r--r-- | binutils/doc/Makefile.in | 8 | ||||
-rw-r--r-- | binutils/doc/binutils.texi | 71 |
3 files changed, 86 insertions, 1 deletions
diff --git a/binutils/doc/Makefile.am b/binutils/doc/Makefile.am index bdd470d..a2295ca 100644 --- a/binutils/doc/Makefile.am +++ b/binutils/doc/Makefile.am @@ -27,6 +27,7 @@ man_MANS = \ size.1 \ strings.1 \ strip.1 \ + elfedit.1 \ windres.1 \ windmc.1 \ $(DEMANGLER_NAME).1 @@ -124,6 +125,13 @@ strip.1: $(binutils_TEXI) $(binutils_TEXINFOS) mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f strip.pod +elfedit.1: $(binutils_TEXI) $(binutils_TEXINFOS) + touch $@ + -$(TEXI2POD) $(MANCONF) -Delfedit < $(binutils_TEXI) > elfedit.pod + -($(POD2MAN) elfedit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) + rm -f elfedit.pod + windres.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod diff --git a/binutils/doc/Makefile.in b/binutils/doc/Makefile.in index 897e5d8..31f4dd3 100644 --- a/binutils/doc/Makefile.in +++ b/binutils/doc/Makefile.in @@ -286,6 +286,7 @@ man_MANS = \ size.1 \ strings.1 \ strip.1 \ + elfedit.1 \ windres.1 \ windmc.1 \ $(DEMANGLER_NAME).1 @@ -816,6 +817,13 @@ strip.1: $(binutils_TEXI) $(binutils_TEXINFOS) mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) rm -f strip.pod +elfedit.1: $(binutils_TEXI) $(binutils_TEXINFOS) + touch $@ + -$(TEXI2POD) $(MANCONF) -Delfedit < $(binutils_TEXI) > elfedit.pod + -($(POD2MAN) elfedit.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \ + mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1) + rm -f elfedit.pod + windres.1: $(binutils_TEXI) $(binutils_TEXINFOS) touch $@ -$(TEXI2POD) $(MANCONF) -Dwindres < $(binutils_TEXI) > windres.pod diff --git a/binutils/doc/binutils.texi b/binutils/doc/binutils.texi index fa4fa26..60ac2bd 100644 --- a/binutils/doc/binutils.texi +++ b/binutils/doc/binutils.texi @@ -44,6 +44,7 @@ section entitled ``GNU Free Documentation License''. * size: (binutils)size. List section sizes and total size. * strings: (binutils)strings. List printable strings from files. * strip: (binutils)strip. Discard symbols. +* elfedit: (binutils)elfedit. Update the ELF header of ELF files. * windmc: (binutils)windmc. Generator for Windows message resources. * windres: (binutils)windres. Manipulate Windows resources. @end direntry @@ -111,6 +112,9 @@ List printable strings from files @item strip Discard symbols +@item elfedit +Update the ELF header of ELF files. + @item c++filt Demangle encoded C++ symbols (on MS-DOS, this program is named @code{cxxfilt}) @@ -146,6 +150,7 @@ in the section entitled ``GNU Free Documentation License''. * size:: List section sizes and total size * strings:: List printable strings from files * strip:: Discard symbols +* elfedit:: Update the ELF header of ELF files * c++filt:: Filter to demangle encoded C++ symbols * cxxfilt: c++filt. MS-DOS name for c++filt * addr2line:: Convert addresses to file and line @@ -2717,7 +2722,7 @@ the Info entries for @file{binutils}. @c man end @end ignore -@node c++filt, addr2line, strip, Top +@node c++filt, addr2line, elfedit, Top @chapter c++filt @kindex c++filt @@ -4090,6 +4095,70 @@ objdump(1), and the Info entries for @file{binutils}. @c man end @end ignore +@node elfedit +@chapter elfedit + +@cindex Update ELF header +@kindex elfedit + +@c man title elfedit Update the ELF header of ELF files. + +@smallexample +@c man begin SYNOPSIS elfedit +elfedit [@option{--input-mach=}@var{machine}] + @option{--output-machine=}@var{machine} + [@option{-v}|@option{--version}] + [@option{-h}|@option{--help}] + @var{elffile}@dots{} +@c man end +@end smallexample + +@c man begin DESCRIPTION elfedit + +@command{elfedit} updates the ELF header of ELF files. The +options control how and which fields in the ELF header should be +updated. + +@var{elffile}@dots{} are the ELF files to be updated. 32-bit and +64-bit ELF files are supported, as are archives containing ELF files. +@c man end + +@c man begin OPTIONS elfedit + +The long and short forms of options, shown here as alternatives, are +equivalent. The @option{--output-mach} option must be given. + +@table @env + +@itemx --input-mach=@var{machine} +Only the input files with ELF machine type, @var{machine}, will be +updated. If @option{--input-mach} isn't specified, any ELF file +will be updated. + +The supported ELF machine types are, @var{L1OM} and @var{x86-64}. + +@itemx --output-mach=@var{machine} +Change the ELF machine type in the ELF header to @var{machine}. The +supported ELF machine types are the same as @option{--input-mach}. + +@item -v +@itemx --version +Display the version number of @command{elfedit}. + +@item -h +@itemx --help +Display the command line options understood by @command{elfedit}. + +@end table + +@c man end + +@ignore +@c man begin SEEALSO elfedit +readelf(1), and the Info entries for @file{binutils}. +@c man end +@end ignore + @node Common Options @chapter Common Options |