@copying
@c man begin COPYRIGHT
Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3
* 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
@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})
* 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
@c man title ar create, modify, and extract from archives
@smallexample
-ar [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]
+ar [@option{--plugin} @var{name}] [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]
ar -M [ <mri-script ]
@end smallexample
@smallexample
@c man begin SYNOPSIS ar
-ar [@option{-X32_64}] [@option{-}]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]
+ar [@option{--plugin} @var{name}] [@option{-X32_64}] [@option{-}]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]
@c man end
@end smallexample
issued unless you specify in advance that you expect to create it, by
using this modifier.
+@item D
+@cindex deterministic archives
+Operate in @emph{deterministic} mode. When adding files and the archive
+index use zero for UIDs, GIDs, timestamps, and use consistent file modes
+for all files. When this option is used, if @command{ar} is used with
+identical options and identical input files, multiple runs will create
+identical output files regardless of the input files' owners, groups,
+file modes, or modification times.
+
@item f
Truncate names in the archive. @sc{gnu} @command{ar} will normally permit file
names of any length. This will cause it to create archives which are
@samp{-X} options; in particular, it does not support @option{-X32}
which is the default for AIX @command{ar}.
+The optional command line switch @option{--plugin} @var{name} causes
+@command{ar} to load the plugin called @var{name} which adds support
+for more file formats. This option is only available if the toolchain
+has been built with plugin support enabled.
+
@c man end
@ignore
@smallexample
@c man begin SYNOPSIS nm
-nm [@option{-a}|@option{--debug-syms}] [@option{-g}|@option{--extern-only}]
+nm [@option{-a}|@option{--debug-syms}]
+ [@option{-g}|@option{--extern-only}][@option{--plugin} @var{name}]
[@option{-B}] [@option{-C}|@option{--demangle}[=@var{style}]] [@option{-D}|@option{--dynamic}]
[@option{-S}|@option{--print-size}] [@option{-s}|@option{--print-armap}]
[@option{-A}|@option{-o}|@option{--print-file-name}][@option{--special-syms}]
object file formats permit more efficient access to small data objects,
such as a global int variable as opposed to a large global array.
-@item I
-The symbol is an indirect reference to another symbol. This is a @sc{gnu}
-extension to the a.out object file format which is rarely used.
-
@item i
-The symbol is in a section specific to the implementation of DLLs.
+For PE format files this indicates that the symbol is in a section
+specific to the implementation of DLLs. For ELF format files this
+indicates that the symbol is an indirect function. This is a GNU
+extension to the standard set of ELF symbol types. It indicates a
+symbol which if referenced by a relocation does not evaluate to its
+address, but instead must be invoked at runtime. The runtime
+execution will then return the value to be used in the relocation.
@item N
The symbol is a debugging symbol.
@item U
The symbol is undefined.
+@item u
+The symbol is a unique global symbol. This is a GNU extension to the
+standard set of ELF symbol bindings. For such a symbol the dynamic linker
+will make sure that in the entire process there is just one symbol with
+this name and type in use.
+
@item V
@itemx v
The symbol is a weak object. When a weak defined symbol is linked with
@cindex external symbols
Display only external symbols.
+@item --plugin @var{name}
+@cindex load plugin
+Load the plugin called @var{name} to add support for extra target
+types. This option is only available if the toolchain has been built
+with plugin support enabled.
+
@item -l
@itemx --line-numbers
@cindex symbol line numbers
@item -S
@itemx --print-size
-Print size, not the value, of defined symbols for the @code{bsd} output format.
+Print both value and size of defined symbols for the @code{bsd} output style.
+This option has no effect for object formats that do not record symbol
+sizes, unless @samp{--size-sort} is also used in which case a
+calculated size is displayed.
@item -s
@itemx --print-armap
[@option{--set-section-flags} @var{section}=@var{flags}]
[@option{--add-section} @var{sectionname}=@var{filename}]
[@option{--rename-section} @var{oldname}=@var{newname}[,@var{flags}]]
+ [@option{--long-section-names} @{enable,disable,keep@}]
[@option{--change-leading-char}] [@option{--remove-leading-char}]
[@option{--reverse-bytes=}@var{num}]
[@option{--srec-len=}@var{ival}] [@option{--srec-forceS3}]
[@option{--readonly-text}]
[@option{--pure}]
[@option{--impure}]
+ [@option{--file-alignment=}@var{num}]
+ [@option{--heap=}@var{size}]
+ [@option{--image-base=}@var{address}]
+ [@option{--section-alignment=}@var{num}]
+ [@option{--stack=}@var{size}]
+ [@option{--subsystem=}@var{which}:@var{major}.@var{minor}]
[@option{-v}|@option{--verbose}]
[@option{-V}|@option{--version}]
[@option{--help}] [@option{--info}]
@item -B @var{bfdarch}
@itemx --binary-architecture=@var{bfdarch}
-Useful when transforming a raw binary input file into an object file.
-In this case the output architecture can be set to @var{bfdarch}. This
-option will be ignored if the input file has a known @var{bfdarch}. You
+Useful when transforming a architecture-less input file into an object file.
+In this case the output architecture can be set to @var{bfdarch}. This
+option will be ignored if the input file has a known @var{bfdarch}. You
can access this binary data inside a program by referencing the special
symbols that are created by the conversion process. These symbols are
called _binary_@var{objfile}_start, _binary_@var{objfile}_end and
<input_binary_file> <output_object_file>
@end smallexample
+@item --long-section-names @{enable,disable,keep@}
+Controls the handling of long section names when processing @code{COFF}
+and @code{PE-COFF} object formats. The default behaviour, @samp{keep},
+is to preserve long section names if any are present in the input file.
+The @samp{enable} and @samp{disable} options forcibly enable or disable
+the use of long section names in the output object; when @samp{disable}
+is in effect, any long section names in the input object will be truncated.
+The @samp{enable} option will only emit long section names if any are
+present in the inputs; this is mostly the same as @samp{keep}, but it
+is left undefined whether the @samp{enable} option might force the
+creation of an empty string table in the output file.
+
@item --change-leading-char
Some object file formats use special characters at the start of
symbols. The most common such character is underscore, which compilers
debugging information, not multiple filenames on a one-per-object-file
basis.
+@item --file-alignment @var{num}
+Specify the file alignment. Sections in the file will always begin at
+file offsets which are multiples of this number. This defaults to
+512.
+[This option is specific to PE targets.]
+
+@item --heap @var{reserve}
+@itemx --heap @var{reserve},@var{commit}
+Specify the number of bytes of memory to reserve (and optionally commit)
+to be used as heap for this program.
+[This option is specific to PE targets.]
+
+@item --image-base @var{value}
+Use @var{value} as the base address of your program or dll. This is
+the lowest memory location that will be used when your program or dll
+is loaded. To reduce the need to relocate and improve performance of
+your dlls, each should have a unique base address and not overlap any
+other dlls. The default is 0x400000 for executables, and 0x10000000
+for dlls.
+[This option is specific to PE targets.]
+
+@item --section-alignment @var{num}
+Sets the section alignment. Sections in memory will always begin at
+addresses which are a multiple of this number. Defaults to 0x1000.
+[This option is specific to PE targets.]
+
+@item --stack @var{reserve}
+@itemx --stack @var{reserve},@var{commit}
+Specify the number of bytes of memory to reserve (and optionally commit)
+to be used as stack for this program.
+[This option is specific to PE targets.]
+
+@item --subsystem @var{which}
+@itemx --subsystem @var{which}:@var{major}
+@itemx --subsystem @var{which}:@var{major}.@var{minor}
+Specifies the subsystem under which your program will execute. The
+legal values for @var{which} are @code{native}, @code{windows},
+@code{console}, @code{posix}, @code{efi-app}, @code{efi-bsd},
+@code{efi-rtd}, @code{sal-rtd}, and @code{xbox}. You may optionally set
+the subsystem version also. Numeric values are also accepted for
+@var{which}.
+[This option is specific to PE targets.]
+
@item --extract-symbol
Keep the file's section flags and symbols but remove all section data.
Specifically, the option:
[@option{-r}|@option{--reloc}]
[@option{-R}|@option{--dynamic-reloc}]
[@option{-s}|@option{--full-contents}]
- [@option{-W}|@option{--dwarf}]
+ [@option{-W[lLiaprmfFsoRt]}|
+ @option{--dwarf}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges]]
[@option{-G}|@option{--stabs}]
[@option{-t}|@option{--syms}]
[@option{-T}|@option{--dynamic-syms}]
[@option{--[no-]show-raw-insn}]
[@option{--adjust-vma=}@var{offset}]
[@option{--special-syms}]
+ [@option{--prefix=}@var{prefix}]
+ [@option{--prefix-strip=}@var{level}]
+ [@option{--insn-width=}@var{width}]
[@option{-V}|@option{--version}]
[@option{-H}|@option{--help}]
@var{objfile}@dots{}
Like @option{-d}, but disassemble the contents of all sections, not just
those expected to contain instructions.
+If the target is an ARM architecture this switch also has the effect
+of forcing the disassembler to decode pieces of data found in code
+sections as if they were instructions.
+
@item --prefix-addresses
When disassembling, print the complete address on each line. This is
the older disassembly format.
architecture information, such as S-records. You can list the available
architectures with the @option{-i} option.
+If the target is an ARM architecture then this switch has an
+additional effect. It restricts the disassembly to only those
+instructions supported by the architecture specified by @var{machine}.
+If it is necessary to use this switch because the input file does not
+contain any architecture information, but it is also desired to
+disassemble all the instructions use @option{-marm}.
+
@item -M @var{options}
@itemx --disassembler-options=@var{options}
Pass target specific information to the disassembler. Only supported on
@cindex dynamic relocation entries, in object file
Print the dynamic relocation entries of the file. This is only
meaningful for dynamic objects, such as certain types of shared
-libraries.
+libraries. As for @option{-r}, if used with @option{-d} or
+@option{-D}, the relocations are printed interspersed with the
+disassembly.
@item -s
@itemx --full-contents
Display source code intermixed with disassembly, if possible. Implies
@option{-d}.
+@item --prefix=@var{prefix}
+@cindex Add prefix to absolute paths
+Specify @var{prefix} to add to the absolute paths when used with
+@option{-S}.
+
+@item --prefix-strip=@var{level}
+@cindex Strip absolute paths
+Indicate how many initial directory names to strip off the hardwired
+absolute paths. It has no effect without @option{--prefix=}@var{prefix}.
+
@item --show-raw-insn
When disassembling instructions, print the instruction in hex as well as
in symbolic form. This is the default except when
When disassembling instructions, do not print the instruction bytes.
This is the default when @option{--prefix-addresses} is used.
-@item -W
-@itemx --dwarf
+@item --insn-width=@var{width}
+@cindex Instruction width
+Display @var{width} bytes on a single line when disassembling
+instructions.
+
+@item -W[lLiaprmfFsoRt]
+@itemx --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges]
@cindex DWARF
@cindex debug symbols
-Displays the contents of the DWARF debug sections in the file, if any
-are present.
+Displays the contents of the debug sections in the file, if any are
+present. If one of the optional letters or words follows the switch
+then only data found in those specific sections will be dumped.
+
+Note that there is no single letter option to display the content of
+trace sections.
@item -G
@itemx --stabs
@table @code
@item l
@itemx g
+@itemx u
@itemx !
-The symbol is local (l), global (g), neither (a space) or both (!). A
+The symbol is a local (l), global (g), unique global (u), neither
+global nor local (a space) or both global and local (!). A
symbol can be neither local or global for a variety of reasons, e.g.,
because it is used for debugging, but it is probably an indication of
-a bug if it is ever both local and global.
+a bug if it is ever both local and global. Unique global symbols are
+a GNU extension to the standard set of ELF symbol bindings. For such
+a symbol the dynamic linker will make sure that in the entire process
+there is just one symbol with this name and type in use.
@item w
The symbol is weak (w) or strong (a space).
@smallexample
@c man begin SYNOPSIS strings
-strings [@option{-afov}] [@option{-}@var{min-len}]
+strings [@option{-afovV}] [@option{-}@var{min-len}]
[@option{-n} @var{min-len}] [@option{--bytes=}@var{min-len}]
[@option{-t} @var{radix}] [@option{--radix=}@var{radix}]
[@option{-e} @var{encoding}] [@option{--encoding=}@var{encoding}]
@xref{Target Selection}, for more information.
@item -v
+@itemx -V
@itemx --version
Print the program version number on the standard output and exit.
@end table
@c man end
@end ignore
-@node c++filt, addr2line, strip, Top
+@node c++filt, addr2line, elfedit, Top
@chapter c++filt
@kindex c++filt
name @code{_foo}. This option removes the initial underscore. Whether
@command{c++filt} removes the underscore by default is target dependent.
-@item -j
-@itemx --java
-Prints demangled names using Java syntax. The default is to use C++
-syntax.
-
@item -n
@itemx --no-strip-underscores
Do not remove the initial underscore.
@smallexample
@c man begin SYNOPSIS addr2line
-addr2line [@option{-b} @var{bfdname}|@option{--target=}@var{bfdname}]
+addr2line [@option{-a}|@option{--addresses}]
+ [@option{-b} @var{bfdname}|@option{--target=}@var{bfdname}]
[@option{-C}|@option{--demangle}[=@var{style}]]
[@option{-e} @var{filename}|@option{--exe=}@var{filename}]
[@option{-f}|@option{--functions}] [@option{-s}|@option{--basename}]
[@option{-i}|@option{--inlines}]
+ [@option{-p}|@option{--pretty-print}]
[@option{-j}|@option{--section=}@var{name}]
[@option{-H}|@option{--help}] [@option{-V}|@option{--version}]
[addr addr @dots{}]
line number for each address is printed on a separate line. If the
@command{-f} option is used, then each @samp{FILENAME:LINENO} line is
preceded by a @samp{FUNCTIONNAME} line which is the name of the function
-containing the address.
+containing the address. If the @command{-a} option is used, then the
+address read is first printed.
If the file name or function name can not be determined,
@command{addr2line} will print two question marks in their place. If the
equivalent.
@table @env
+@item -a
+@itemx --addresses
+Display address before function names or file and line number
+information. The address is printed with a @samp{0x} prefix to easily
+identify it.
+
@item -b @var{bfdname}
@itemx --target=@var{bfdname}
@cindex object code format
@item -j
@itemx --section
Read offsets relative to the specified section instead of absolute addresses.
+
+@item -p
+@itemx --pretty-print
+Make the output more human friendly: each location are printed on one line.
+If option @option{-i} is specified, lines for all enclosing scopes are
+prefixed with @samp{(inlined by)}.
@end table
@c man end
@c man title windmc generates Windows message resources.
@smallexample
-@c man begin SYNOPSIS windres
+@c man begin SYNOPSIS windmc
windmc [options] input-file
@c man end
@end smallexample
@table @env
@item -a
@itemx --ascii_in
-Specifies that the input file specified is ANSI. This is the default
+Specifies that the input file specified is ASCII. This is the default
behaviour.
@item -A
@itemx --ascii_out
-Specifies that messages in the output @code{bin} files should be in ANSI
+Specifies that messages in the output @code{bin} files should be in ASCII
format.
@item -b
[@option{-e}|@option{--output-exp} @var{exports-file-name}]
[@option{-z}|@option{--output-def} @var{def-file-name}]
[@option{-l}|@option{--output-lib} @var{library-file-name}]
+ [@option{-y}|@option{--output-delaylib} @var{library-file-name}]
[@option{--export-all-symbols}] [@option{--no-export-all-symbols}]
[@option{--exclude-symbols} @var{list}]
[@option{--no-default-excludes}]
[@option{-k}|@option{--kill-at}] [@option{-A}|@option{--add-stdcall-alias}]
[@option{-p}|@option{--ext-prefix-alias} @var{prefix}]
[@option{-x}|@option{--no-idata4}] [@option{-c}|@option{--no-idata5}]
- [@option{-I}|@option{--identify} @var{library-file-name}] [@option{-i}|@option{--interwork}]
+ [@option{--use-nul-prefixed-import-tables}]
+ [@option{-I}|@option{--identify} @var{library-file-name}] [@option{--identify-strict}]
+ [@option{-i}|@option{--interwork}]
[@option{-n}|@option{--nodelete}] [@option{-t}|@option{--temp-prefix} @var{prefix}]
[@option{-v}|@option{--verbose}]
[@option{-h}|@option{--help}] [@option{-V}|@option{--version}]
+ [@option{--no-leading-underscore}] [@option{--leading-underscore}]
[object-file @dots{}]
@c man end
@end smallexample
library'). This file can be created by giving the @option{-l} option to
dlltool when it is creating or reading in a @file{.def} file.
+If the @option{-y} option is specified, dlltool generates a delay-import
+library that can be used instead of the normal import library to allow
+a program to link to the dll only as soon as an imported function is
+called for the first time. The resulting executable will need to be
+linked to the static delayimp library containing __delayLoadHelper2(),
+which in turn will import LoadLibraryA and GetProcAddress from kernel32.
+
@command{dlltool} builds the library file by hand, but it builds the
exports file by creating temporary files containing assembler statements
and then assembling these. The @option{-S} command line option can be
@itemx --output-lib @var{filename}
Specifies the name of the library file to be created by dlltool.
+@item -y @var{filename}
+@itemx --output-delaylib @var{filename}
+Specifies the name of the delay-import library file to be created by dlltool.
+
@item --export-all-symbols
Treat all global and weak defined symbols found in the input object
files as symbols to be exported. There is a small list of symbols which
Specifies that when @command{dlltool} is creating the exports file it
should prepend an underscore to the names of @emph{all} exported symbols.
+@item --no-leading-underscore
+@item --leading-underscore
+Specifies whether standard symbol should be forced to be prefixed, or
+not.
+
@item --add-stdcall-underscore
Specifies that when @command{dlltool} is creating the exports file it
should prepend an underscore to the names of exported @emph{stdcall}
files it should omit the @code{.idata4} section. This is for compatibility
with certain operating systems.
+@item --use-nul-prefixed-import-tables
+Specifies that when @command{dlltool} is creating the exports and library
+files it should prefix the @code{.idata4} and @code{.idata5} by zero an
+element. This emulates old gnu import library generation of
+@code{dlltool}. By default this option is turned off.
+
@item -c
@itemx --no-idata5
Specifies that when @command{dlltool} is creating the exports and library
@item -I @var{filename}
@itemx --identify @var{filename}
Specifies that @command{dlltool} should inspect the import library
-indicated by @var{filename} and report, on @code{stdout}, the name of
-the associated DLL. This can be performed in addition to any other
-operations indicated by the other options and arguments. @command{dlltool}
-@option{--identify} fails if the import library does not exist, is not
-actually an import library, or (rarely) if the import library somehow
-specifies more than one associated DLL.
+indicated by @var{filename} and report, on @code{stdout}, the name(s)
+of the associated DLL(s). This can be performed in addition to any
+other operations indicated by the other options and arguments.
+@command{dlltool} fails if the import library does not exist or is not
+actually an import library. See also @option{--identify-strict}.
+
+@item --identify-strict
+Modifies the behavior of the @option{--identify} option, such
+that an error is reported if @var{filename} is associated with
+more than one DLL.
@item -i
@itemx --interwork
@item @code{LIBRARY} @var{name} @code{[ ,} @var{base} @code{]}
The result is going to be named @var{name}@code{.dll}.
-@item @code{EXPORTS ( ( (} @var{name1} @code{[ = } @var{name2} @code{] ) | ( } @var{name1} @code{=} @var{module-name} @code{.} @var{external-name} @code{) )}
+@item @code{EXPORTS ( ( (} @var{name1} @code{[ = } @var{name2} @code{] ) | ( } @var{name1} @code{=} @var{module-name} @code{.} @var{external-name} @code{) ) [ == } @var{its_name} @code{]}
@item @code{[} @var{integer} @code{] [ NONAME ] [ CONSTANT ] [ DATA ] [ PRIVATE ] ) *}
Declares @var{name1} as an exported symbol from the DLL, with optional
ordinal number @var{integer}, or declares @var{name1} as an alias
-(forward) of the function @var{external-name} in the DLL
+(forward) of the function @var{external-name} in the DLL.
+If @var{its_name} is specified, this name is used as string in export table.
@var{module-name}.
-@item @code{IMPORTS ( (} @var{internal-name} @code{=} @var{module-name} @code{.} @var{integer} @code{) | [} @var{internal-name} @code{= ]} @var{module-name} @code{.} @var{external-name} @code{) ) *}
+@item @code{IMPORTS ( (} @var{internal-name} @code{=} @var{module-name} @code{.} @var{integer} @code{) | [} @var{internal-name} @code{= ]} @var{module-name} @code{.} @var{external-name} @code{) [ == ) @var{its_name} @code{]} *}
Declares that @var{external-name} or the exported function whose
ordinal number is @var{integer} is to be imported from the file
@var{module-name}. If @var{internal-name} is specified then this is
the name that the imported function will be referred to in the body of
the DLL.
+If @var{its_name} is specified, this name is used as string in import table.
@item @code{DESCRIPTION} @var{string}
Puts @var{string} into the output @file{.exp} file in the
[@option{-t}|@option{--section-details}]
[@option{-e}|@option{--headers}]
[@option{-s}|@option{--syms}|@option{--symbols}]
+ [@option{--dyn-syms}]
[@option{-n}|@option{--notes}]
[@option{-r}|@option{--relocs}]
[@option{-u}|@option{--unwind}]
[@option{-D}|@option{--use-dynamic}]
[@option{-x} <number or name>|@option{--hex-dump=}<number or name>]
[@option{-p} <number or name>|@option{--string-dump=}<number or name>]
+ [@option{-R} <number or name>|@option{--relocated-dump=}<number or name>]
[@option{-c}|@option{--archive-index}]
- [@option{-w[lLiaprmfFsoR]}|
- @option{--debug-dump}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]]
- [@option{-I}|@option{-histogram}]
+ [@option{-w[lLiaprmfFsoRt]}|
+ @option{--debug-dump}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges]]
+ [@option{-I}|@option{--histogram}]
[@option{-v}|@option{--version}]
[@option{-W}|@option{--wide}]
[@option{-H}|@option{--help}]
@cindex ELF symbol table information
Displays the entries in symbol table section of the file, if it has one.
+@item --dyn-syms
+@cindex ELF dynamic symbol table information
+Displays the entries in dynamic symbol table section of the file, if it
+has one.
+
@item -e
@itemx --headers
Display all the headers in the file. Equivalent to @option{-h -l -S}.
@itemx --unwind
@cindex unwind information
Displays the contents of the file's unwind section, if it has one. Only
-the unwind sections for IA64 ELF files are currently supported.
+the unwind sections for IA64 ELF files, as well as ARM unwind tables
+(@code{.ARM.exidx} / @code{.ARM.extab}) are currently supported.
@item -d
@itemx --dynamic
@item -D
@itemx --use-dynamic
When displaying symbols, this option makes @command{readelf} use the
-symbol table in the file's dynamic section, rather than the one in the
-symbols section.
+symbol hash tables in the file's dynamic section, rather than the
+symbol table sections.
@item -x <number or name>
@itemx --hex-dump=<number or name>
-Displays the contents of the indicated section as a hexadecimal dump.
+Displays the contents of the indicated section as a hexadecimal bytes.
A number identifies a particular section by index in the section table;
any other string identifies all sections with that name in the object file.
+@item -R <number or name>
+@itemx --relocated-dump=<number or name>
+Displays the contents of the indicated section as a hexadecimal
+bytes. A number identifies a particular section by index in the
+section table; any other string identifies all sections with that name
+in the object file. The contents of the section will be relocated
+before they are displayed.
+
@item -p <number or name>
@itemx --string-dump=<number or name>
Displays the contents of the indicated section as printable strings.
of binary archives. Performs the same function as the @option{t}
command to @command{ar}, but without using the BFD library. @xref{ar}.
-@item -w[lLiaprmfFsoR]
-@itemx --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges]
+@item -w[lLiaprmfFsoRt]
+@itemx --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges]
Displays the contents of the debug sections in the file, if any are
present. If one of the optional letters or words follows the switch
then only data found in those specific sections will be dumped.
+Note that there is no single letter option to display the content of
+trace sections.
+
Note: the @option{=decodedline} option will display the interpreted
contents of a .debug_line section whereas the @option{=rawline} option
dumps the contents in a raw format.
+Note: the @option{=frames-interp} option will display the interpreted
+contents of a .debug_frame section whereas the @option{=frames} option
+dumps the contents in a raw format.
+
@item -I
@itemx --histogram
Display a histogram of bucket list lengths when displaying the contents
@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{--input-type=}@var{type}]
+ [@option{--input-osabi=}@var{osbi}]
+ @option{--output-mach=}@var{machine}
+ @option{--output-type=}@var{type}
+ @option{--output-osabi=}@var{osbi}
+ [@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 which have
+the matching ELF machine and file types. 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. At least one of the @option{--output-mach},
+@option{--output-type} and @option{--output-osabi} options must be given.
+
+@table @env
+
+@itemx --input-mach=@var{machine}
+Set the matching input ELF machine type to @var{machine}. If
+@option{--input-mach} isn't specified, it will match any ELF
+machine types.
+
+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}.
+
+@itemx --input-type=@var{type}
+Set the matching input ELF file type to @var{type}. If
+@option{--input-type} isn't specified, it will match any ELF file types.
+
+The supported ELF file types are, @var{rel}, @var{exec} and @var{dyn}.
+
+@itemx --output-type=@var{type}
+Change the ELF file type in the ELF header to @var{type}. The
+supported ELF types are the same as @option{--input-type}.
+
+@itemx --input-osabi=@var{osabi}
+Set the matching input ELF file OSABI to @var{osbi}. If
+@option{--input-osabi} isn't specified, it will match any ELF OSABIs.
+
+The supported ELF OSABIs are, @var{none}, @var{HPUX}, @var{NetBSD},
+@var{Linux}, @var{Hurd}, @var{Solaris}, @var{AIX}, @var{Irix},
+@var{FreeBSD}, @var{TRU64}, @var{Modesto}, @var{OpenBSD}, @var{OpenVMS},
+@var{NSK}, @var{AROS} and @var{FenixOS}.
+
+@itemx --output-osabi=@var{osabi}
+Change the ELF OSABI in the ELF header to @var{type}. The
+supported ELF OSABI are the same as @option{--input-osabi}.
+
+@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