\input texinfo @c -*- Texinfo -*-
@setfilename binutils.info
-@c Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007
-@c Free Software Foundation, Inc.
+@settitle @sc{gnu} Binary Utilities
+@finalout
+@synindex ky cp
@c man begin INCLUDE
@include bfdver.texi
@c man end
-@ifinfo
-@format
-START-INFO-DIR-ENTRY
-* Binutils: (binutils). The GNU binary utilities.
-* ar: (binutils)ar. Create, modify, and extract from archives
-* nm: (binutils)nm. List symbols from object files
-* objcopy: (binutils)objcopy. Copy and translate object files
-* objdump: (binutils)objdump. Display information from object files
-* ranlib: (binutils)ranlib. Generate index to archive contents
-* readelf: (binutils)readelf. Display the contents of ELF format files.
-* size: (binutils)size. List section sizes and total size
-* strings: (binutils)strings. List printable strings from files
-* strip: (binutils)strip. Discard symbols
-* c++filt: (binutils)c++filt. Filter to demangle encoded C++ symbols
-* cxxfilt: (binutils)c++filt. MS-DOS name for c++filt
-* addr2line: (binutils)addr2line. Convert addresses to file and line
-* nlmconv: (binutils)nlmconv. Converts object code into an NLM
-* windres: (binutils)windres. Manipulate Windows resources
-* windmc: (binutils)windmc. Generator for Windows message resources
-* dlltool: (binutils)dlltool. Create files needed to build and use DLLs
-END-INFO-DIR-ENTRY
-@end format
-@end ifinfo
-
@copying
@c man begin COPYRIGHT
-Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
+2010, 2011, 2012
+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.1
+under the terms of the GNU Free Documentation License, Version 1.3
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
@c man end
@end copying
-@synindex ky cp
-@c
-@c This file documents the GNU binary utilities "ar", "ld", "objcopy",
-@c "objdump", "nm", "size", "strings", "strip", "readelf" and "ranlib".
-@c
-@c Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-@c 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
-@c
-@c This text may be freely distributed under the terms of the GNU
-@c Free Documentation License.
-@c
-
-@setchapternewpage odd
-@settitle @sc{gnu} Binary Utilities
+@dircategory Software development
+@direntry
+* Binutils: (binutils). The GNU binary utilities.
+@end direntry
+
+@dircategory Individual utilities
+@direntry
+* addr2line: (binutils)addr2line. Convert addresses to file and line.
+* ar: (binutils)ar. Create, modify, and extract from archives.
+* c++filt: (binutils)c++filt. Filter to demangle encoded C++ symbols.
+* cxxfilt: (binutils)c++filt. MS-DOS name for c++filt.
+* dlltool: (binutils)dlltool. Create files needed to build and use DLLs.
+* nlmconv: (binutils)nlmconv. Converts object code into an NLM.
+* nm: (binutils)nm. List symbols from object files.
+* objcopy: (binutils)objcopy. Copy and translate object files.
+* objdump: (binutils)objdump. Display information from object files.
+* ranlib: (binutils)ranlib. Generate index to archive contents.
+* readelf: (binutils)readelf. Display the contents of ELF format files.
+* 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
+
@titlepage
-@finalout
@title The @sc{gnu} Binary Utilities
@ifset VERSION_PACKAGE
@subtitle @value{VERSION_PACKAGE}
@tex
{\parskip=0pt \hfill Cygnus Support\par \hfill
-\TeX{}info \texinfoversion\par }
+Texinfo \texinfoversion\par }
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 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.1
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, with no Front-Cover Texts, and with no
- Back-Cover Texts. A copy of the license is included in the
- section entitled ``GNU Free Documentation License''.
-
+@insertcopying
@end titlepage
@contents
@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})
@end iftex
This document is distributed under the terms of the GNU Free
-Documentation License. A copy of the license is included in the
-section entitled "GNU Free Documentation License".
+Documentation License version 1.3. A copy of the license is included
+in the section entitled ``GNU Free Documentation License''.
@menu
* ar:: Create, modify, and extract from archives
* objcopy:: Copy and translate object files
* objdump:: Display information from object files
* ranlib:: Generate index to archive contents
-* readelf:: Display the contents of ELF format files.
+* readelf:: Display the contents of ELF format files
* 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
* windmc:: Generator for Windows message resources
* dlltool:: Create files needed to build and use DLLs
* Common Options:: Command-line options for all utilities
-* Selecting The Target System:: How these utilities determine the target.
+* Selecting the Target System:: How these utilities determine the target
* Reporting Bugs:: Reporting Bugs
* GNU Free Documentation License:: GNU Free Documentation License
-* Binutils Index:: Binutils Index
+* Binutils Index:: Binutils Index
@end menu
@node ar
@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}]] [@option{--target} @var{bfdname}] @var{archive} [@var{member}@dots{}]
ar -M [ <mri-script ]
@end smallexample
table. If an archive lacks the table, another form of @command{ar} called
@command{ranlib} can be used to add just the table.
+@cindex thin archives
+@sc{gnu} @command{ar} can optionally create a @emph{thin} archive,
+which contains a symbol index and references to the original copies
+of the member files of the archives. Such an archive is useful
+for building libraries for use within a local build, where the
+relocatable objects are expected to remain available, and copying the
+contents of each object would only waste time and space. Thin archives
+are also @emph{flattened}, so that adding one or more archives to a
+thin archive will add the elements of the nested archive individually.
+The paths to the elements of the archive are stored relative to the
+archive itself.
+
@cindex compatibility, @command{ar}
@cindex @command{ar} compatibility
@sc{gnu} @command{ar} is designed to be compatible with two different
@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}]] [@option{--target} @var{bfdname}] @var{archive} [@var{member}@dots{}]
@c man end
@end smallexample
@samp{r} to indicate whether the file was appended (no old member
deleted) or replaced.
+@item s
+@cindex ranlib
+Add an index to the archive, or update it if it already exists. Note
+this command is an exception to the rule that there can only be one
+command letter, as it is possible to use it as either a command or a
+modifier. In either case it does the same thing.
+
@item t
@cindex contents of archive
Display a @emph{table} listing the contents of @var{archive}, or those
If you do not specify a @var{member}, all files in the archive
are extracted.
+Files cannot be extracted from a thin archive.
+
+@item --help
+Displays the list of command line options supported by @command{ar}
+and then exits.
+
+@item --version
+Displays the version information of @command{ar} and then exits.
+
@end table
A number of modifiers (@var{mod}) may immediately follow the @var{p}
issued unless you specify in advance that you expect to create it, by
using this modifier.
+@item D
+@cindex deterministic archives
+@kindex --enable-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.
+
+If @file{binutils} was configured with
+@option{--enable-deterministic-archives}, then this mode is on by default.
+It can be disabled with the @samp{U} modifier, below.
+
@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{S} modifier on the last execution of @samp{ar}, or you must run
@samp{ranlib} on the archive.
+@item T
+@cindex creating thin archive
+Make the specified @var{archive} a @emph{thin} archive. If it already
+exists and is a regular archive, the existing members must be present
+in the same directory as @var{archive}.
+
@item u
@cindex updating an archive
Normally, @samp{ar r}@dots{} inserts all files
not allowed, since checking the timestamps would lose any speed
advantage from the operation @samp{q}.
+@item U
+@cindex deterministic archives
+@kindex --enable-deterministic-archives
+Do @emph{not} operate in @emph{deterministic} mode. This is the inverse
+of the @samp{D} modifier, above: added files and the archive index will
+get their actual UID, GID, timestamp, and file mode values.
+
+This is the default unless @file{binutils} was configured with
+@option{--enable-deterministic-archives}.
+
@item v
This modifier requests the @emph{verbose} version of an operation. Many
operations display additional information, such as filenames processed,
@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.
+
+The optional command line switch @option{--target} @var{bfdname}
+specifies that the archive members are in an object code format
+different from your system's default format. See
+@xref{Target Selection}, for more information.
+
@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}]
@item
The symbol type. At least the following types are used; others are, as
well, depending on the object file format. If lowercase, the symbol is
-local; if uppercase, the symbol is global (external).
+usually local; if uppercase, the symbol is global (external). There
+are however a few lowercase symbols that are shown for special global
+symbols (@code{u}, @code{v} and @code{w}).
@c Some more detail on exactly what these symbol types are used for
@c would be nice.
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{-x}|@option{--discard-all}]
[@option{-X}|@option{--discard-locals}]
[@option{-b} @var{byte}|@option{--byte=}@var{byte}]
- [@option{-i} @var{interleave}|@option{--interleave=}@var{interleave}]
+ [@option{-i} [@var{breadth}]|@option{--interleave}[=@var{breadth}]]
+ [@option{--interleave-width=}@var{width}]
[@option{-j} @var{sectionname}|@option{--only-section=}@var{sectionname}]
[@option{-R} @var{sectionname}|@option{--remove-section=}@var{sectionname}]
[@option{-p}|@option{--preserve-dates}]
+ [@option{-D}|@option{--enable-deterministic-archives}]
[@option{--debugging}]
[@option{--gap-fill=}@var{val}]
[@option{--pad-to=}@var{address}]
[@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{--add-gnu-debuglink=}@var{path-to-file}]
[@option{--keep-file-symbols}]
[@option{--only-keep-debug}]
+ [@option{--strip-dwo}]
+ [@option{--extract-dwo}]
[@option{--extract-symbol}]
[@option{--writable-text}]
[@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{--compress-debug-sections}]
+ [@option{--decompress-debug-sections}]
+ [@option{--dwarf-depth=@var{n}}]
+ [@option{--dwarf-start=@var{n}}]
[@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
@item -b @var{byte}
@itemx --byte=@var{byte}
-Keep only every @var{byte}th byte of the input file (header data is not
-affected). @var{byte} can be in the range from 0 to @var{interleave}-1,
-where @var{interleave} is given by the @option{-i} or @option{--interleave}
-option, or the default of 4. This option is useful for creating files
-to program @sc{rom}. It is typically used with an @code{srec} output
-target.
-
-@item -i @var{interleave}
-@itemx --interleave=@var{interleave}
-Only copy one out of every @var{interleave} bytes. Select which byte to
-copy with the @option{-b} or @option{--byte} option. The default is 4.
-@command{objcopy} ignores this option if you do not specify either @option{-b} or
-@option{--byte}.
+If interleaving has been enabled via the @option{--interleave} option
+then start the range of bytes to keep at the @var{byte}th byte.
+@var{byte} can be in the range from 0 to @var{breadth}-1, where
+@var{breadth} is the value given by the @option{--interleave} option.
+
+@item -i [@var{breadth}]
+@itemx --interleave[=@var{breadth}]
+Only copy a range out of every @var{breadth} bytes. (Header data is
+not affected). Select which byte in the range begins the copy with
+the @option{--byte} option. Select the width of the range with the
+@option{--interleave-width} option.
+
+This option is useful for creating files to program @sc{rom}. It is
+typically used with an @code{srec} output target. Note that
+@command{objcopy} will complain if you do not specify the
+@option{--byte} option as well.
+
+The default interleave breadth is 4, so with @option{--byte} set to 0,
+@command{objcopy} would copy the first byte out of every four bytes
+from the input to the output.
+
+@item --interleave-width=@var{width}
+When used with the @option{--interleave} option, copy @var{width}
+bytes at a time. The start of the range of bytes to be copied is set
+by the @option{--byte} option, and the extent of the range is set with
+the @option{--interleave} option.
+
+The default value for this option is 1. The value of @var{width} plus
+the @var{byte} value set by the @option{--byte} option must not exceed
+the interleave breadth set by the @option{--interleave} option.
+
+This option can be used to create images for two 16-bit flashes interleaved
+in a 32-bit bus by passing @option{-b 0 -i 4 --interleave-width=2}
+and @option{-b 2 -i 4 --interleave-width=2} to two @command{objcopy}
+commands. If the input was '12345678' then the outputs would be
+'1256' and '3478' respectively.
@item -p
@itemx --preserve-dates
Set the access and modification dates of the output file to be the same
as those of the input file.
+@item -D
+@itemx --enable-deterministic-archives
+Operate in @emph{deterministic} mode. When copying archive members
+and writing the archive index, use zero for UIDs, GIDs, timestamps,
+and use consistent file modes for all files.
+
@item --debugging
Convert debugging information, if possible. This is not the default
because only certain debugging formats are supported, and the
<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
to add a link to the debugging info into the stripped executable.
@end enumerate
-Note - the choice of @code{.dbg} as an extension for the debug info
+Note---the choice of @code{.dbg} as an extension for the debug info
file is arbitrary. Also the @code{--only-keep-debug} step is
optional. You could instead do this:
full executable. It does not have to be a file created by the
@option{--only-keep-debug} switch.
-Note - this switch is only intended for use on fully linked files. It
+Note---this switch is only intended for use on fully linked files. It
does not make sense to use it on object files where the debugging
information may be incomplete. Besides the gnu_debuglink feature
currently only supports the presence of one filename containing
debugging information, not multiple filenames on a one-per-object-file
basis.
+@item --strip-dwo
+Remove the contents of all DWARF .dwo sections, leaving the
+remaining debugging sections and all symbols intact.
+This option is intended for use by the compiler as part of
+the @option{-gsplit-dwarf} option, which splits debug information
+between the .o file and a separate .dwo file. The compiler
+generates all debug information in the same file, then uses
+the @option{--extract-dwo} option to copy the .dwo sections to
+the .dwo file, then the @option{--strip-dwo} option to remove
+those sections from the original .o file.
+
+@item --extract-dwo
+Extract the contents of all DWARF .dwo sections. See the
+@option{--strip-dwo} option for more information.
+
+@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:
@itemize
-@item sets the virtual and load addresses of every section to zero;
@item removes the contents of all sections;
@item sets the size of every section to zero; and
@item sets the file's start address to zero.
It can also be a useful way of reducing the size of a @option{--just-symbols}
linker input file.
+@item --compress-debug-sections
+Compress DWARF debug sections using zlib.
+
+@item --decompress-debug-sections
+Decompress DWARF debug sections using zlib.
+
@item -V
@itemx --version
Show the version number of @command{objcopy}.
[@option{-z}|@option{--disassemble-zeroes}]
[@option{-EB}|@option{-EL}|@option{--endian=}@{big | little @}]
[@option{-f}|@option{--file-headers}]
+ [@option{-F}|@option{--file-offsets}]
[@option{--file-start-context}]
[@option{-g}|@option{--debugging}]
[@option{-e}|@option{--debugging-tags}]
[@option{-m} @var{machine}|@option{--architecture=}@var{machine}]
[@option{-M} @var{options}|@option{--disassembler-options=}@var{options}]
[@option{-p}|@option{--private-headers}]
+ [@option{-P} @var{options}|@option{--private=}@var{options}]
[@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,=gdb_index]]
[@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{}
The long and short forms of options, shown here as alternatives, are
equivalent. At least one option from the list
-@option{-a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-r,-R,-s,-S,-t,-T,-V,-x} must be given.
+@option{-a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-P,-r,-R,-s,-S,-t,-T,-V,-x} must be given.
@table @env
@item -a
@item -g
@itemx --debugging
-Display debugging information. This attempts to parse debugging
-information stored in the file and print it out using a C like syntax.
-Only certain types of debugging information have been implemented.
-Some other types are supported by @command{readelf -w}.
-@xref{readelf}.
+Display debugging information. This attempts to parse STABS and IEEE
+debugging format information stored in the file and print it out using
+a C like syntax. If neither of these formats are found this option
+falls back on the @option{-W} option to print any DWARF information in
+the file.
@item -e
@itemx --debugging-tags
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.
Display summary information from the overall header of
each of the @var{objfile} files.
+@item -F
+@itemx --file-offsets
+@cindex object file offsets
+When disassembling sections, whenever a symbol is displayed, also
+display the file offset of the region of data that is about to be
+dumped. If zeroes are being skipped, then when disassembly resumes,
+tell the user how many zeroes were skipped and the file offset of the
+location from where the disassembly resumes. When dumping sections,
+display the file offset of the location from where the dump starts.
+
@item --file-start-context
@cindex source code context
Specify that when displaying interlisted source code/disassembly
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
following may be specified as a comma separated string.
@option{x86-64}, @option{i386} and @option{i8086} select disassembly for
the given architecture. @option{intel} and @option{att} select between
-intel syntax mode and AT&T syntax mode. @option{addr64}, @option{addr32},
+intel syntax mode and AT&T syntax mode.
+@option{intel-mnemonic} and @option{att-mnemonic} select between
+intel mnemonic mode and AT&T mnemonic mode. @option{intel-mnemonic}
+implies @option{intel} and @option{att-mnemonic} implies @option{att}.
+@option{addr64}, @option{addr32},
@option{addr16}, @option{data32} and @option{data16} specify the default
address size and operand size. These four options will be overridden if
@option{x86-64}, @option{i386} or @option{i8086} appear later in the
instructs the disassembler to print a mnemonic suffix even when the
suffix could be inferred by the operands.
-For PPC, @option{booke}, @option{booke32} and @option{booke64} select
-disassembly of BookE instructions. @option{32} and @option{64} select
-PowerPC and PowerPC64 disassembly, respectively. @option{e300}
-selects disassembly for the e300 family. @option{440} selects
-disassembly for the PowerPC 440. @option{ppcps} selects disassembly
-for the paired single instructions of the PPC750CL.
+For PowerPC, @option{booke} controls the disassembly of BookE
+instructions. @option{32} and @option{64} select PowerPC and
+PowerPC64 disassembly, respectively. @option{e300} selects
+disassembly for the e300 family. @option{440} selects disassembly for
+the PowerPC 440. @option{ppcps} selects disassembly for the paired
+single instructions of the PPC750CL.
For MIPS, this option controls the printing of instruction mnemonic
names and register names in disassembled instructions. Multiple
information printed depends upon the object file format. For some
object file formats, no additional information is printed.
+@item -P @var{options}
+@itemx --private=@var{options}
+Print information that is specific to the object file format. The
+argument @var{options} is a comma separated list that depends on the
+format (the lists of options is displayed with the help).
+
+For XCOFF, the available options are: @option{header}, @option{aout},
+@option{sections}, @option{syms}, @option{relocs}, @option{lineno},
+@option{loader}, @option{except}, @option{typchk}, @option{traceback}
+and @option{toc}.
+
@item -r
@itemx --reloc
@cindex relocation entries, in object file
@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,=gdb_index]
@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 or .gdb_index.
+
+Note: the output from the @option{=info} option can also be affected
+by the options @option{--dwarf-depth}, the @option{--dwarf-start} and
+the @option{--dwarf-check}.
+
+@item --dwarf-depth=@var{n}
+Limit the dump of the @code{.debug_info} section to @var{n} children.
+This is only useful with @option{--dwarf=info}. The default is
+to print all DIEs; the special value 0 for @var{n} will also have this
+effect.
+
+With a non-zero value for @var{n}, DIEs at or deeper than @var{n}
+levels will not be printed. The range for @var{n} is zero-based.
+
+@item --dwarf-start=@var{n}
+Print only DIEs beginning with the DIE numbered @var{n}. This is only
+useful with @option{--dwarf=info}.
+
+If specified, this option will suppress printing of any header
+information and all DIEs before the DIE numbered @var{n}. Only
+siblings and children of the specified DIE will be printed.
+
+This can be used in conjunction with @option{--dwarf-depth}.
+
+@item --dwarf-check
+Enable additional checks for consistency of Dwarf information.
@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
-symbol can be neither local or global for a variety of reasons, eg
+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).
warning symbol is ever referenced.
@item I
-The symbol is an indirect reference to another symbol (I) or a normal
-symbol (a space).
+@item i
+The symbol is an indirect reference to another symbol (I), a function
+to be evaluated during reloc processing (i) or a normal symbol (a
+space).
@item d
@itemx D
@smallexample
@c man begin SYNOPSIS ranlib
-ranlib [@option{-vV}] @var{archive}
+ranlib [@option{--plugin} @var{name}] [@option{-DhHvVt}] @var{archive}
@c man end
@end smallexample
@c man begin OPTIONS ranlib
@table @env
+@item -h
+@itemx -H
+@itemx --help
+Show usage information for @command{ranlib}.
+
@item -v
@itemx -V
@itemx --version
Show the version number of @command{ranlib}.
+
+@item -D
+@cindex deterministic archives
+@kindex --enable-deterministic-archives
+Operate in @emph{deterministic} mode. The symbol map archive member's
+header will show zero for the UID, GID, and timestamp. When this
+option is used, multiple runs will produce identical output files.
+
+This is the default unless @file{binutils} was configured with
+@option{--enable-deterministic-archives}.
+
+@item -t
+Update the timestamp of the symbol map of an archive.
+
+@item -U
+@cindex deterministic archives
+@kindex --enable-deterministic-archives
+Do @emph{not} operate in @emph{deterministic} mode. This is the
+inverse of the @samp{-D} option, above: the archive index will get
+actual UID, GID, timestamp, and file mode values.
+
+This is the default unless @file{binutils} was configured with
+@option{--enable-deterministic-archives}.
@end table
@c man end
@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}]
characters (ASCII, ISO 8859, etc., default), @samp{S} =
single-8-bit-byte characters, @samp{b} = 16-bit bigendian, @samp{l} =
16-bit littleendian, @samp{B} = 32-bit bigendian, @samp{L} = 32-bit
-littleendian. Useful for finding wide character strings.
+littleendian. Useful for finding wide character strings. (@samp{l}
+and @samp{b} apply to, for example, Unicode UTF-16/UCS-2 encodings).
@item -T @var{bfdname}
@itemx --target=@var{bfdname}
@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
[@option{-O} @var{bfdname} |@option{--output-target=}@var{bfdname}]
[@option{-s}|@option{--strip-all}]
[@option{-S}|@option{-g}|@option{-d}|@option{--strip-debug}]
+ [@option{--strip-dwo}]
[@option{-K} @var{symbolname} |@option{--keep-symbol=}@var{symbolname}]
[@option{-N} @var{symbolname} |@option{--strip-symbol=}@var{symbolname}]
[@option{-w}|@option{--wildcard}]
[@option{-x}|@option{--discard-all}] [@option{-X} |@option{--discard-locals}]
[@option{-R} @var{sectionname} |@option{--remove-section=}@var{sectionname}]
[@option{-o} @var{file}] [@option{-p}|@option{--preserve-dates}]
+ [@option{-D}|@option{--enable-deterministic-archives}]
[@option{--keep-file-symbols}]
[@option{--only-keep-debug}]
[@option{-v} |@option{--verbose}] [@option{-V}|@option{--version}]
@itemx --strip-debug
Remove debugging symbols only.
+@item --strip-dwo
+Remove the contents of all DWARF .dwo sections, leaving the
+remaining debugging sections and all symbols intact.
+See the description of this option in the @command{objcopy} section
+for more information.
+
@item --strip-unneeded
Remove all symbols that are not needed for relocation processing.
@itemx --preserve-dates
Preserve the access and modification dates of the file.
+@item -D
+@itemx --enable-deterministic-archives
+Operate in @emph{deterministic} mode. When copying archive members
+and writing the archive index, use zero for UIDs, GIDs, timestamps,
+and use consistent file modes for all files.
+
@item -w
@itemx --wildcard
Permit regular expressions in @var{symbolname}s used in other command
to add a link to the debugging info into the stripped executable.
@end enumerate
-Note - the choice of @code{.dbg} as an extension for the debug info
+Note---the choice of @code{.dbg} as an extension for the debug info
file is arbitrary. Also the @code{--only-keep-debug} step is
optional. You could instead do this:
@enumerate
@item Link the executable as normal.
-@item Copy @code{foo} to @code{foo.full}
+@item Copy @code{foo} to @code{foo.full}
@item Run @code{strip --strip-debug foo}
@item Run @code{objcopy --add-gnu-debuglink=foo.full foo}
@end enumerate
-ie the file pointed to by the @option{--add-gnu-debuglink} can be the
+i.e., the file pointed to by the @option{--add-gnu-debuglink} can be the
full executable. It does not have to be a file created by the
@option{--only-keep-debug} switch.
-Note - this switch is only intended for use on fully linked files. It
+Note---this switch is only intended for use on fully linked files. It
does not make sense to use it on object files where the debugging
information may be incomplete. Besides the gnu_debuglink feature
currently only supports the presence of one filename containing
@c man end
@end ignore
-@node c++filt, addr2line, strip, Top
+@node c++filt, addr2line, elfedit, Top
@chapter c++filt
@kindex c++filt
@smallexample
@c man begin SYNOPSIS cxxfilt
-c++filt [@option{-_}|@option{--strip-underscores}]
- [@option{-n}|@option{--no-strip-underscores}]
+c++filt [@option{-_}|@option{--strip-underscore}]
+ [@option{-n}|@option{--no-strip-underscore}]
[@option{-p}|@option{--no-params}]
[@option{-t}|@option{--types}]
[@option{-i}|@option{--no-verbose}]
echo _Z1fv, | c++filt -n
@end smallexample
-and will display ``f(),'' ie the demangled name followed by a
+and will display ``f(),'', i.e., the demangled name followed by a
trailing comma. This behaviour is because when the names are read
from the standard input it is expected that they might be part of an
assembler source file where there might be extra, extraneous
-characters trailing after a mangled name. eg:
+characters trailing after a mangled name. For example:
@smallexample
.type _Z1fv, @@function
@table @env
@item -_
-@itemx --strip-underscores
+@itemx --strip-underscore
On some systems, both the C and C++ compilers put an underscore in front
of every name. For example, the C name @code{foo} gets the low-level
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
+@itemx --no-strip-underscore
Do not remove the initial underscore.
@item -p
@itemx --types
Attempt to demangle types as well as function names. This is disabled
by default since mangled types are normally only used internally in
-the compiler, and they can be confused with non-mangled names. eg
+the compiler, and they can be confused with non-mangled names. For example,
a function called ``a'' treated as a mangled type name would be
demangled to ``signed char''.
@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{}]
in a pipe to convert dynamically chosen addresses.
The format of the output is @samp{FILENAME:LINENO}. The file name and
-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.
+line number for each input address is printed on separate lines.
+
+If the @option{-f} option is used, then each @samp{FILENAME:LINENO}
+line is preceded by @samp{FUNCTIONNAME} which is the name of the
+function containing the address.
+
+If the @option{-i} option is used and the code at the given address is
+present there because of inlining by the compiler then the
+@samp{@{FUNCTIONNAME@} FILENAME:LINENO} information for the inlining
+function will be displayed afterwards. This continues recursively
+until there is no more inlining to report.
+
+If the @option{-a} option is used then the output is prefixed by the
+input address.
+
+If the @option{-p} option is used then the output for each input
+address is displayed on one, possibly quite long, line. If
+@option{-p} is not used then the output is broken up into multiple
+lines, based on the paragraphs above.
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 the address before the function name, 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
to use, including any leading arguments. The default preprocessor
argument is @code{gcc -E -xc-header -DRC_INVOKED}.
+@item --preprocessor-arg @var{option}
+When @command{windres} reads an @code{rc} file, it runs it through
+the C preprocessor first. This option may be used to specify additional
+text to be passed to preprocessor on its command line.
+This option can be used multiple times to add multiple options to the
+preprocessor command line.
+
@item -I @var{directory}
@itemx --include-dir @var{directory}
Specify an include directory to use when reading an @code{rc} file.
[@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{-U}|@option{--add-underscore}] [@option{--add-stdcall-underscore}]
[@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{--interwork}]
+ [@option{-x}|@option{--no-idata4}] [@option{-c}|@option{--no-idata5}]
+ [@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
@command{dlltool} when it is creating or reading in a @file{.def} file.
The third file needed for DLL creation is the library file that programs
-will link with in order to access the functions in the DLL. This file
-can be created by giving the @option{-l} option to dlltool when it
-is creating or reading in a @file{.def} file.
+will link with in order to access the functions in the DLL (an `import
+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
gcc program.o dll.lib -o program
@end smallexample
+
+@command{dlltool} may also be used to query an existing import library
+to determine the name of the DLL to which it is associated. See the
+description of the @option{-I} or @option{--identify} option.
+
@c man end
@c man begin OPTIONS dlltool
@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
files it should omit the @code{.idata5} section. This is for compatibility
with certain operating systems.
+@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(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
Specifies that @command{dlltool} should mark the objects in the library
@item @code{LIBRARY} @var{name} @code{[ ,} @var{base} @code{]}
The result is going to be named @var{name}@code{.dll}.
+Note: If you want to use LIBRARY as name then you need to quote. Otherwise
+this will fail due a necessary hack for libtool (see PR binutils/13710 for more
+details).
-@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}.
+Note: The @code{EXPORTS} has to be the last command in .def file, as keywords
+are treated - beside @code{LIBRARY} - as simple name-identifiers.
+If you want to use LIBRARY as name then you need to quote it.
-@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.
+Note: The @code{IMPORTS} has to be the last command in .def file, as keywords
+are treated - beside @code{LIBRARY} - as simple name-identifiers.
+If you want to use LIBRARY as name then you need to quote it.
@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[liaprmfFsoR]}|
- @option{--debug-dump}[=line,=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,=gdb_index]]
+ [@option{--dwarf-depth=@var{n}}]
+ [@option{--dwarf-start=@var{n}}]
+ [@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[liaprmfFsoR]
-@itemx --debug-dump[=line,=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,=gdb_index]
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 or .gdb_index.
+
+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.
+
+Note: the output from the @option{=info} option can also be affected
+by the options @option{--dwarf-depth} and @option{--dwarf-start}.
+
+@item --dwarf-depth=@var{n}
+Limit the dump of the @code{.debug_info} section to @var{n} children.
+This is only useful with @option{--debug-dump=info}. The default is
+to print all DIEs; the special value 0 for @var{n} will also have this
+effect.
+
+With a non-zero value for @var{n}, DIEs at or deeper than @var{n}
+levels will not be printed. The range for @var{n} is zero-based.
+
+@item --dwarf-start=@var{n}
+Print only DIEs beginning with the DIE numbered @var{n}. This is only
+useful with @option{--debug-dump=info}.
+
+If specified, this option will suppress printing of any header
+information and all DIEs before the DIE numbered @var{n}. Only
+siblings and children of the specified DIE will be printed.
+
+This can be used in conjunction with @option{--dwarf-depth}.
+
@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{osabi}]
+ @option{--output-mach=}@var{machine}
+ @option{--output-type=}@var{type}
+ @option{--output-osabi=}@var{osabi}
+ [@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}, @var{K1OM} 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{osabi}. 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{GNU}, @var{Linux} (alias for @var{GNU}),
+@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{osabi}. 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
@end table
@c man end
-@node Selecting The Target System
+@node Selecting the Target System
@chapter Selecting the Target System
You can specify two aspects of the target system to the @sc{gnu}
things without first using the debugger to find the facts.
@end itemize
+@node GNU Free Documentation License
+@appendix GNU Free Documentation License
+
@include fdl.texi
@node Binutils Index