@copying
@c man begin COPYRIGHT
-Copyright @copyright{} 1991-2020 Free Software Foundation, Inc.
+Copyright @copyright{} 1991-2023 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
@code{cxxfilt})
@item addr2line
-Convert addresses into file names and line numbers
+Convert addresses or symbol+offset into file names and line numbers
@item windres
Manipulate Windows resources
* strip:: Discard symbols
* c++filt:: Filter to demangle encoded C++ symbols
* cxxfilt: c++filt. MS-DOS name for c++filt
-* addr2line:: Convert addresses to file and line
+* addr2line:: Convert addresses or symbol+offset to file and line
* windmc:: Generator for Windows message resources
* windres:: Manipulate Windows resources
* dlltool:: Create files needed to build and use DLLs
@c man title ar create, modify, and extract from archives
@smallexample
-ar [-]@var{p}[@var{mod}] [@option{--plugin} @var{name}] [@option{--target} @var{bfdname}] [@option{--output} @var{dirname}] [@var{relpos}] [@var{count}] @var{archive} [@var{member}@dots{}]
+ar [-]@var{p}[@var{mod}] [@option{--plugin} @var{name}] [@option{--target} @var{bfdname}] [@option{--output} @var{dirname}] [@option{--record-libdeps} @var{libdeps}] [@var{relpos}] [@var{count}] @var{archive} [@var{member}@dots{}]
ar -M [ <mri-script ]
@end smallexample
@cindex libraries
@command{ar} is considered a binary utility because archives of this sort
are most often used as @dfn{libraries} holding commonly needed
-subroutines.
+subroutines. Since libraries often will depend on other libraries,
+@command{ar} can also record the dependencies of a library when the
+@option{--record-libdeps} option is specified.
@cindex symbol index
@command{ar} creates an index to the symbols defined in relocatable
@smallexample
@c man begin SYNOPSIS ar
-ar [@option{-X32_64}] [@option{-}]@var{p}[@var{mod}] [@option{--plugin} @var{name}] [@option{--target} @var{bfdname}] [@option{--output} @var{dirname}] [@var{relpos}] [@var{count}] @var{archive} [@var{member}@dots{}]
+ar [@option{-X32_64}] [@option{-}]@var{p}[@var{mod}] [@option{--plugin} @var{name}] [@option{--target} @var{bfdname}] [@option{--output} @var{dirname}] [@option{--record-libdeps} @var{libdeps}] [@option{--thin}] [@var{relpos}] [@var{count}] @var{archive} [@var{member}@dots{}]
@c man end
@end smallexample
@var{archive} specification. (same as @samp{b}).
@item l
-This modifier is accepted but not used.
+@c This modifier was accepted but not used.
@c whaffor ar l modifier??? presumably compat; with
@c what???---doc@@cygnus.com, 25jan91
+Specify dependencies of this library. The dependencies must immediately
+follow this option character, must use the same syntax as the linker
+command line, and must be specified within a single argument. I.e., if
+multiple items are needed, they must be quoted to form a single command
+line argument. For example @samp{L "-L/usr/local/lib -lmydep1 -lmydep2"}
@item N
Uses the @var{count} parameter. This is used if there are multiple
@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}.
+Deprecated alias for @option{--thin}. @option{T} is not recommended because in
+many ar implementations @option{T} has a different meaning, as specified by
+X/Open System Interface.
@item u
@cindex updating an archive
extraction operation that option must still be included on the command
line.
+@item --record-libdeps @var{libdeps}
+The @option{--record-libdeps} option is identical to the @option{l} modifier,
+just handled in long form.
+
+@item --thin
+@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}.
+
@end table
@c man end
@smallexample
@c man begin SYNOPSIS nm
-nm [@option{-A}|@option{-o}|@option{--print-file-name}] [@option{-a}|@option{--debug-syms}]
- [@option{-B}|@option{--format=bsd}] [@option{-C}|@option{--demangle}[=@var{style}]]
- [@option{-D}|@option{--dynamic}] [@option{-f}@var{format}|@option{--format=}@var{format}]
- [@option{-g}|@option{--extern-only}] [@option{-h}|@option{--help}]
+nm [@option{-A}|@option{-o}|@option{--print-file-name}]
+ [@option{-a}|@option{--debug-syms}]
+ [@option{-B}|@option{--format=bsd}]
+ [@option{-C}|@option{--demangle}[=@var{style}]]
+ [@option{-D}|@option{--dynamic}]
+ [@option{-f}@var{format}|@option{--format=}@var{format}]
+ [@option{-g}|@option{--extern-only}]
+ [@option{-h}|@option{--help}]
+ [@option{--ifunc-chars=@var{CHARS}}]
+ [@option{-j}|@option{--format=just-symbols}]
[@option{-l}|@option{--line-numbers}] [@option{--inlines}]
[@option{-n}|@option{-v}|@option{--numeric-sort}]
- [@option{-P}|@option{--portability}] [@option{-p}|@option{--no-sort}]
- [@option{-r}|@option{--reverse-sort}] [@option{-S}|@option{--print-size}]
- [@option{-s}|@option{--print-armap}] [@option{-t} @var{radix}|@option{--radix=}@var{radix}]
- [@option{-u}|@option{--undefined-only}] [@option{-V}|@option{--version}]
- [@option{-X 32_64}] [@option{--defined-only}] [@option{--no-demangle}]
- [@option{--plugin} @var{name}]
+ [@option{-P}|@option{--portability}]
+ [@option{-p}|@option{--no-sort}]
+ [@option{-r}|@option{--reverse-sort}]
+ [@option{-S}|@option{--print-size}]
+ [@option{-s}|@option{--print-armap}]
+ [@option{-t} @var{radix}|@option{--radix=}@var{radix}]
+ [@option{-u}|@option{--undefined-only}]
+ [@option{-U}|@option{--defined-only}]
+ [@option{-V}|@option{--version}]
+ [@option{-W}|@option{--no-weak}]
+ [@option{-X 32_64}]
+ [@option{--no-demangle}]
[@option{--no-recurse-limit}|@option{--recurse-limit}]]
- [@option{--size-sort}] [@option{--special-syms}]
- [@option{--synthetic}] [@option{--target=}@var{bfdname}]
+ [@option{--plugin} @var{name}]
+ [@option{--size-sort}]
+ [@option{--special-syms}]
+ [@option{--synthetic}]
+ [@option{--target=}@var{bfdname}]
+ [@option{--unicode=}@var{method}]
+ [@option{--with-symbol-versions}]
+ [@option{--without-symbol-versions}]
[@var{objfile}@dots{}]
@c man end
@end smallexample
behavior is system dependent.
@item C
+@itemx c
The symbol is common. Common symbols are uninitialized data. When
linking, multiple common symbols may appear with the same name. If the
symbol is defined anywhere, the common symbols are treated as undefined
For more details on common symbols, see the discussion of
--warn-common in @ref{Options,,Linker options,ld.info,The GNU linker}.
@end ifclear
+The lower case @var{c} character is used when the symbol is in a
+special section for small commons.
@item D
@itemx d
@item i
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.
+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.
+
+Note - the actual symbols display for GNU indirect symbols is
+controlled by the @option{--ifunc-chars} command line option. If this
+option has been provided then the first character in the string will
+be used for global indirect function symbols. If the string contains
+a second character then that will be used for local indirect function
+symbols.
@item I
The symbol is an indirect reference to another symbol.
The symbol is a debugging symbol.
@item n
-The symbol is in the read-only data section.
+The symbol is in a non-data, non-code, non-debug read-only section.
@item p
The symbol is in a stack unwind section.
@end table
@item
-The symbol name.
+The symbol name. If a symbol has version information associated with it,
+then the version information is displayed as well. If the versioned
+symbol is undefined or hidden from linker, the version string is displayed
+as a suffix to the symbol name, preceded by an @@ character. For example
+@samp{foo@@VER_1}. If the version is the default version to be used when
+resolving unversioned references to the symbol, then it is displayed as a
+suffix preceded by two @@ characters. For example @samp{foo@@@@VER_2}.
@end itemize
@c man end
@itemx --no-recursion-limit
Enables or disables a limit on the amount of recursion performed
whilst demangling strings. Since the name mangling formats allow for
-an inifinite level of recursion it is possible to create strings whose
+an infinite level of recursion it is possible to create strings whose
decoding will exhaust the amount of stack space available on the host
machine, triggering a memory fault. The limit tries to prevent this
from happening by restricting recursion to 2048 levels of nesting.
@cindex @command{nm} format
@cindex @command{nm} compatibility
Use the output format @var{format}, which can be @code{bsd},
-@code{sysv}, or @code{posix}. The default is @code{bsd}.
+@code{sysv}, @code{posix} or @code{just-symbols}. The default is @code{bsd}.
Only the first character of @var{format} is significant; it can be
either upper or lower case.
@itemx --help
Show a summary of the options to @command{nm} and exit.
+@item --ifunc-chars=@var{CHARS}
+When display GNU indirect function symbols @command{nm} will default
+to using the @code{i} character for both local indirect functions and
+global indirect functions. The @option{--ifunc-chars} option allows
+the user to specify a string containing one or two characters. The
+first character will be used for global indirect function symbols and
+the second character, if present, will be used for local indirect
+function symbols.
+
+@item j
+The same as @option{--format=just-symbols}.
+
@item -l
@itemx --line-numbers
@cindex symbol line numbers
@cindex external symbols
@cindex undefined symbols
Display only undefined symbols (those external to each object file).
+By default both defined and undefined symbols are displayed.
+
+@item -U
+@itemx --defined-only
+@cindex external symbols
+@cindex undefined symbols
+Display only defined symbols for each object file.
+By default both defined and undefined symbols are displayed.
@item -V
@itemx --version
@option{32_64}. The default mode of AIX @command{nm} corresponds
to @option{-X 32}, which is not supported by @sc{gnu} @command{nm}.
-@item --defined-only
-@cindex external symbols
-@cindex undefined symbols
-Display only defined symbols for each object file.
-
@item --plugin @var{name}
@cindex plugins
Load the plugin called @var{name} to add support for extra target
the size of the symbol is printed, rather than the value, and
@samp{-S} must be used in order both size and value to be printed.
+Note - this option does not work if @option{--undefined-only} has been
+enabled as undefined symbols have no size.
+
@item --special-syms
Display symbols which have a target-specific special meaning. These
symbols are usually used by the target for some special processing and
created by the linker for various purposes. They are not shown by
default since they are not part of the binary's original source code.
+@item --unicode=@var{[default|invalid|locale|escape|hex|highlight]}
+Controls the display of UTF-8 encoded multibyte characters in strings.
+The default (@option{--unicode=default}) is to give them no special
+treatment. The @option{--unicode=locale} option displays the sequence
+in the current locale, which may or may not support them. The options
+@option{--unicode=hex} and @option{--unicode=invalid} display them as
+hex byte sequences enclosed by either angle brackets or curly braces.
+
+The @option{--unicode=escape} option displays them as escape sequences
+(@var{\uxxxx}) and the @option{--unicode=highlight} option displays
+them as escape sequences highlighted in red (if supported by the
+output device). The colouring is intended to draw attention to the
+presence of unicode sequences where they might not be expected.
+
+@item -W
+@itemx --no-weak
+Do not display weak symbols.
+
+@item --with-symbol-versions
+@item --without-symbol-versions
+Enables or disables the display of symbol version information. The
+version string is displayed as a suffix to the symbol name, preceded
+by an @@ character. For example @samp{foo@@VER_1}. If the version is
+the default version to be used when resolving unversioned references
+to the symbol then it is displayed as a suffix preceded by two @@
+characters. For example @samp{foo@@@@VER_2}. By default, symbol
+version information is displayed.
+
@item --target=@var{bfdname}
@cindex object code format
Specify an object code format other than your system's default format.
[@option{-g}|@option{--strip-debug}]
[@option{--strip-unneeded}]
[@option{-K} @var{symbolname}|@option{--keep-symbol=}@var{symbolname}]
+ [@option{--keep-file-symbols}]
+ [@option{--keep-section-symbols}]
[@option{-N} @var{symbolname}|@option{--strip-symbol=}@var{symbolname}]
[@option{--strip-unneeded-symbol=}@var{symbolname}]
[@option{-G} @var{symbolname}|@option{--keep-global-symbol=}@var{symbolname}]
[@option{-R} @var{sectionpattern}|@option{--remove-section=}@var{sectionpattern}]
[@option{--keep-section=}@var{sectionpattern}]
[@option{--remove-relocations=}@var{sectionpattern}]
+ [@option{--strip-section-headers}]
[@option{-p}|@option{--preserve-dates}]
[@option{-D}|@option{--enable-deterministic-archives}]
[@option{-U}|@option{--disable-deterministic-archives}]
[@option{--prefix-sections=}@var{string}]
[@option{--prefix-alloc-sections=}@var{string}]
[@option{--add-gnu-debuglink=}@var{path-to-file}]
- [@option{--keep-file-symbols}]
[@option{--only-keep-debug}]
[@option{--strip-dwo}]
[@option{--extract-dwo}]
--only-section=.text.* --only-section=!.text.foo
@end smallexample
-will copy all sectinos maching '.text.*' but not the section
+will copy all sectinos matching '.text.*' but not the section
'.text.foo'.
@item -R @var{sectionpattern}
'.text.*', but will not remove relocations for the section
'.text.foo'.
+@item --strip-section-headers
+Strip section header This option is specific to ELF files.
+Implies @option{--strip-all} and @option{--merge-notes}.
+
@item -S
@itemx --strip-all
Do not copy relocation and symbol information from the source file.
+Also deletes debug sections.
@item -g
@itemx --strip-debug
Do not copy debugging symbols or sections from the source file.
@item --strip-unneeded
-Strip all symbols that are not needed for relocation processing.
+Remove all symbols that are not needed for relocation processing in
+addition to debugging symbols and sections stripped by
+@option{--strip-debug}.
@item -K @var{symbolname}
@itemx --keep-symbol=@var{symbolname}
locations before the debugger is run everything should work
correctly.
+@item --keep-section-symbils
+When stripping a file, perhaps with @option{--strip-debug} or
+@option{--strip-unneeded}, retain any symbols specifying section names,
+which would otherwise get stripped.
+
@item --keep-file-symbols
When stripping a file, perhaps with @option{--strip-debug} or
@option{--strip-unneeded}, retain any symbols specifying source file names,
@itemx --compress-debug-sections=zlib
@itemx --compress-debug-sections=zlib-gnu
@itemx --compress-debug-sections=zlib-gabi
+@itemx --compress-debug-sections=zstd
For ELF files, these options control how DWARF debug sections are
compressed. @option{--compress-debug-sections=none} is equivalent
to @option{--decompress-debug-sections}.
@option{--compress-debug-sections=zlib} and
@option{--compress-debug-sections=zlib-gabi} are equivalent to
@option{--compress-debug-sections}.
-@option{--compress-debug-sections=zlib-gnu} compresses DWARF debug
-sections using zlib. The debug sections are renamed to begin with
-@samp{.zdebug} instead of @samp{.debug}. Note - if compression would
-actually make a section @emph{larger}, then it is not compressed nor
-renamed.
+@option{--compress-debug-sections=zlib-gnu} compresses DWARF debug sections
+using the obsoleted zlib-gnu format. The debug sections are renamed to begin
+with @samp{.zdebug}.
+@option{--compress-debug-sections=zstd} compresses DWARF debug
+sections using zstd. Note - if compression would actually make a section
+@emph{larger}, then it is not compressed nor renamed.
@item --decompress-debug-sections
-Decompress DWARF debug sections using zlib. The original section
-names of the compressed sections are restored.
+Decompress DWARF debug sections. For a @samp{.zdebug} section, the original
+name is restored.
@item --elf-stt-common=yes
@itemx --elf-stt-common=no
[@option{-r}|@option{--reloc}]
[@option{-R}|@option{--dynamic-reloc}]
[@option{-s}|@option{--full-contents}]
- [@option{-W[lLiaprmfFsoORtUuTgAckK]}|
- @option{--dwarf}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]]
+ [@option{-W[lLiaprmfFsoORtUuTgAck]}|
+ @option{--dwarf}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links]]
+ [@option{-WK}|@option{--dwarf=follow-links}]
+ [@option{-WN}|@option{--dwarf=no-follow-links}]
+ [@option{-wD}|@option{--dwarf=use-debuginfod}]
+ [@option{-wE}|@option{--dwarf=do-not-use-debuginfod}]
+ [@option{-L}|@option{--process-links}]
[@option{--ctf=}@var{section}]
+ [@option{--sframe=}@var{section}]
[@option{-G}|@option{--stabs}]
[@option{-t}|@option{--syms}]
[@option{-T}|@option{--dynamic-syms}]
[@option{--prefix-addresses}]
[@option{--[no-]show-raw-insn}]
[@option{--adjust-vma=}@var{offset}]
+ [@option{--show-all-symbols}]
[@option{--dwarf-depth=@var{n}}]
[@option{--dwarf-start=@var{n}}]
[@option{--ctf-parent=}@var{section}]
[@option{--prefix-strip=}@var{level}]
[@option{--insn-width=}@var{width}]
[@option{--visualize-jumps[=color|=extended-color|=off]}
+ [@option{--disassembler-color=[off|terminal|on|extended]}
+ [@option{-U} @var{method}] [@option{--unicode=}@var{method}]
[@option{-V}|@option{--version}]
[@option{-H}|@option{--help}]
@var{objfile}@dots{}
@itemx --no-recursion-limit
Enables or disables a limit on the amount of recursion performed
whilst demangling strings. Since the name mangling formats allow for
-an inifinite level of recursion it is possible to create strings whose
+an infinite level of recursion it is possible to create strings whose
decoding will exhaust the amount of stack space available on the host
machine, triggering a memory fault. The limit tries to prevent this
from happening by restricting recursion to 2048 levels of nesting.
next symbol is encountered. If there are no matches for @var{symbol}
then nothing will be displayed.
-Note if the @option{--dwarf=follow-links} option has also been enabled
+Note if the @option{--dwarf=follow-links} option is enabled
then any symbol tables in linked debug info files will be read in and
used when disassembling.
@item -D
@itemx --disassemble-all
-Like @option{-d}, but disassemble the contents of all sections, not just
-those expected to contain instructions.
+Like @option{-d}, but disassemble the contents of all non-empty
+non-bss sections, not just those expected to contain instructions.
+@option{-j} may be used to select specific sections.
This option also has a subtle effect on the disassembly of
instructions in code sections. When option @option{-d} is in effect
of forcing the disassembler to decode pieces of data found in code
sections as if they were instructions.
-Note if the @option{--dwarf=follow-links} option has also been enabled
+Note if the @option{--dwarf=follow-links} option is enabled
then any symbol tables in linked debug info files will be read in and
used when disassembling.
@item -j @var{name}
@itemx --section=@var{name}
@cindex section information
-Display information only for section @var{name}.
+Display information for section @var{name}. This option may be
+specified multiple times.
+
+@item -L
+@itemx --process-links
+Display the contents of non-debug sections found in separate debuginfo
+files that are linked to the main file. This option automatically
+implies the @option{-WK} option, and only sections requested by other
+command line options will be displayed.
@item -l
@itemx --line-numbers
architecture information, such as S-records. You can list the available
architectures with the @option{-i} option.
+For most architectures it is possible to supply an architecture
+name and a machine name, separated by a colon. For example
+@samp{foo:bar} would refer to the @samp{bar} machine type in the
+@samp{foo} architecture. This can be helpful if objdump has been
+configured to support multiple architectures.
+
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}.
printed using the decimal representation, while the long immediate
values are printed as hexadecimal.
-@option{cpu=...} allows to enforce a particular ISA when disassembling
+@option{cpu=...} allows one to enforce a particular ISA when disassembling
instructions, overriding the @option{-m} value or whatever is in the ELF file.
This might be useful to select ARC EM or HS ISA, because architecture is same
for those and disassembler relies on private ELF header data to decide if code
@option{601}, @option{603}, @option{604}, @option{620}, @option{7400},
@option{7410}, @option{7450}, @option{7455}, @option{750cl},
@option{821}, @option{850}, @option{860}, @option{a2}, @option{booke},
-@option{booke32}, @option{cell}, @option{com}, @option{e200z4},
+@option{booke32}, @option{cell}, @option{com}, @option{e200z2}, @option{e200z4},
@option{e300}, @option{e500}, @option{e500mc}, @option{e500mc64},
@option{e500x2}, @option{e5500}, @option{e6500}, @option{efs},
@option{power4}, @option{power5}, @option{power6}, @option{power7},
@option{ppc32}, @option{ppc64}, @option{ppc64bridge}, @option{ppcps},
@option{pwr}, @option{pwr2}, @option{pwr4}, @option{pwr5}, @option{pwr5x},
@option{pwr6}, @option{pwr7}, @option{pwr8}, @option{pwr9}, @option{pwr10},
-@option{pwrx}, @option{titan}, and @option{vle}.
+@option{pwrx}, @option{titan}, @option{vle}, and @option{future}.
@option{32} and @option{64} modify the default or a prior CPU
selection, disabling and enabling 64-bit insns respectively. In
-addition, @option{altivec}, @option{any}, @option{htm}, @option{vsx},
-and @option{spe} add capabilities to a previous @emph{or later} CPU
-selection. @option{any} will disassemble any opcode known to
+addition, @option{altivec}, @option{any}, @option{lsp}, @option{htm},
+@option{vsx}, @option{spe} and @option{spe2} add capabilities to a
+previous @emph{or later} CPU selection.
+@option{any} will disassemble any opcode known to
binutils, but in cases where an opcode has two different meanings or
different arguments, you may not see the disassembly you expect.
If you disassemble without giving a CPU selection, a default will be
@item ldinfo
@end table
+For PE, the available options are:
+@table @code
+@item header
+@item sections
+@end table
+
Not all object formats support this option. In particular the ELF
format does not use it.
@itemx --full-contents
@cindex sections, full contents
@cindex object file sections
-Display the full contents of any sections requested. By default all
-non-empty sections are displayed.
+Display the full contents of sections, often used in combination with
+@option{-j} to request specific sections. By default all non-empty
+non-bss sections are displayed.
@item -S
@itemx --source
Display source code intermixed with disassembly, if possible. Implies
@option{-d}.
+@item --show-all-symbols
+When disassembling, show all the symbols that match a given address,
+not just the first one.
+
@item --source-comment[=@var{txt}]
@cindex source disassembly
@cindex disassembly, with source
after it has previously been enabled then use
@option{visualize-jumps=off}.
+@item --disassembler-color=off
+@itemx --disassembler-color=terminal
+@itemx --disassembler-color=on|color|colour
+@itemx --disassembler-color=extened|extended-color|extened-colour
+Enables or disables the use of colored syntax highlighting in
+disassembly output. The default behaviour is determined via a
+configure time option. Note, not all architectures support colored
+syntax highlighting, and depending upon the terminal used, colored
+output may not actually be legible.
+
+The @option{on} argument adds colors using simple terminal colors.
+
+The @option{terminal} argument does the same, but only if the output
+device is a terminal.
+
+The @option{extended-color} argument is similar to the @option{on}
+argument, but it uses 8-bit colors. These may not work on all
+terminals.
+
+The @option{off} argument disables colored disassembly.
+
@item -W[lLiaprmfFsoORtUuTgAckK]
@itemx --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]
@include debug.options.texi
@include ctf.options.texi
+@include sframe.options.texi
+
@item -G
@itemx --stabs
@cindex stab
in the symbol table, the @var{sec} number is the section number, the
@var{fl} value are the symbol's flag bits, the @var{ty} number is the
symbol's type, the @var{scl} number is the symbol's storage class and
-the @var{nx} value is the number of auxilary entries associated with
+the @var{nx} value is the number of auxiliary entries associated with
the symbol. The last two fields are the symbol's value and its name.
The other common output format, usually seen with ELF based files,
00000000 g .text 00000000 fred
@end smallexample
-Here the first number is the symbol's value (sometimes refered to as
+Here the first number is the symbol's value (sometimes referred to as
its address). The next field is actually a set of characters and
spaces indicating the flag bits that are set on the symbol. These
characters are described below. Next is the section with which the
special in some way and which would not normally be of interest to the
user.
+@item -U @var{[d|i|l|e|x|h]}
+@itemx --unicode=@var{[default|invalid|locale|escape|hex|highlight]}
+Controls the display of UTF-8 encoded multibyte characters in strings.
+The default (@option{--unicode=default}) is to give them no special
+treatment. The @option{--unicode=locale} option displays the sequence
+in the current locale, which may or may not support them. The options
+@option{--unicode=hex} and @option{--unicode=invalid} display them as
+hex byte sequences enclosed by either angle brackets or curly braces.
+
+The @option{--unicode=escape} option displays them as escape sequences
+(@var{\uxxxx}) and the @option{--unicode=highlight} option displays
+them as escape sequences highlighted in red (if supported by the
+output device). The colouring is intended to draw attention to the
+presence of unicode sequences where they might not be expected.
+
@item -V
@itemx --version
Print the version number of @command{objdump} and exit.
[@option{--common}]
[@option{-t}|@option{--totals}]
[@option{--target=}@var{bfdname}] [@option{-V}|@option{--version}]
+ [@option{-f}]
[@var{objfile}@dots{}]
@c man end
@end smallexample
@end smallexample
@item --help
+@itemx -h
+@itemx -H
+@item -?
Show a summary of acceptable arguments and options.
@item -d
automatically recognize many formats.
@xref{Target Selection}, for more information.
+@item -v
@item -V
@itemx --version
Display the version number of @command{size}.
+
+@item -f
+Ignored. This option is used by other versions of the @command{size}
+program, but it is not supported by the GNU Binutils version.
+
@end table
@c man end
[@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}]
+ [@option{-U} @var{method}] [@option{--unicode=}@var{method}]
[@option{-}] [@option{--all}] [@option{--print-file-name}]
[@option{-T} @var{bfdname}] [@option{--target=}@var{bfdname}]
[@option{-w}] [@option{--include-all-whitespace}]
- [@option{-s}] [@option{--output-separator}@var{sep_string}]
+ [@option{-s}] [@option{--output-separator} @var{sep_string}]
[@option{--help}] [@option{--version}] @var{file}@dots{}
@c man end
@end smallexample
@item -@var{min-len}
@itemx -n @var{min-len}
@itemx --bytes=@var{min-len}
-Print sequences of characters that are at least @var{min-len} characters
-long, instead of the default 4.
+Print sequences of displayable characters that are at least
+@var{min-len} characters long. If not specified a default minimum
+length of 4 is used. The distinction between displayable and
+non-displayable characters depends upon the setting of the
+@option{-e} and @option{-U} options. Sequences are always terminated
+at control characters such as new-line and carriage-return, but not
+the tab character.
@item -o
Like @samp{-t o}. Some other versions of @command{strings} have @option{-o}
@itemx --encoding=@var{encoding}
Select the character encoding of the strings that are to be found.
Possible values for @var{encoding} are: @samp{s} = single-7-bit-byte
-characters (ASCII, ISO 8859, etc., default), @samp{S} =
+characters (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. (@samp{l}
and @samp{b} apply to, for example, Unicode UTF-16/UCS-2 encodings).
+@item -U @var{[d|i|l|e|x|h]}
+@itemx --unicode=@var{[default|invalid|locale|escape|hex|highlight]}
+Controls the display of UTF-8 encoded multibyte characters in strings.
+The default (@option{--unicode=default}) is to give them no special
+treatment, and instead rely upon the setting of the
+@option{--encoding} option. The other values for this option
+automatically enable @option{--encoding=S}.
+
+The @option{--unicode=invalid} option treats them as non-graphic
+characters and hence not part of a valid string. All the remaining
+options treat them as valid string characters.
+
+The @option{--unicode=locale} option displays them in the current
+locale, which may or may not support UTF-8 encoding. The
+@option{--unicode=hex} option displays them as hex byte sequences
+enclosed between @var{<>} characters. The @option{--unicode=escape}
+option displays them as escape sequences (@var{\uxxxx}) and the
+@option{--unicode=highlight} option displays them as escape sequences
+highlighted in red (if supported by the output device). The colouring
+is intended to draw attention to the presence of unicode sequences
+where they might not be expected.
+
@item -T @var{bfdname}
@itemx --target=@var{bfdname}
@cindex object code format
[@option{-R} @var{sectionname} |@option{--remove-section=}@var{sectionname}]
[@option{--keep-section=}@var{sectionpattern}]
[@option{--remove-relocations=}@var{sectionpattern}]
+ [@option{--strip-section-headers}]
[@option{-o} @var{file}] [@option{-p}|@option{--preserve-dates}]
[@option{-D}|@option{--enable-deterministic-archives}]
[@option{-U}|@option{--disable-deterministic-archives}]
+ [@option{--keep-section-symbols}]
[@option{--keep-file-symbols}]
[@option{--only-keep-debug}]
[@option{-v} |@option{--verbose}] [@option{-V}|@option{--version}]
'.text.*', but will not remove relocations for the section
'.text.foo'.
+@item --strip-section-headers
+Strip section headers. This option is specific to ELF files. Implies
+@option{--strip-all} and @option{--merge-notes}.
+
@item -s
@itemx --strip-all
Remove all symbols.
for more information.
@item --strip-unneeded
-Remove all symbols that are not needed for relocation processing.
+Remove all symbols that are not needed for relocation processing in
+addition to debugging symbols and sections stripped by
+@option{--strip-debug}.
@item -K @var{symbolname}
@itemx --keep-symbol=@var{symbolname}
Remove compiler-generated local symbols.
(These usually start with @samp{L} or @samp{.}.)
+@item --keep-section-symbols
+When stripping a file, perhaps with @option{--strip-debug} or
+@option{--strip-unneeded}, retain any symbols specifying section names,
+which would otherwise get stripped.
+
@item --keep-file-symbols
When stripping a file, perhaps with @option{--strip-debug} or
@option{--strip-unneeded}, retain any symbols specifying source file names,
@itemx --no-recursion-limit
Enables or disables a limit on the amount of recursion performed
whilst demangling strings. Since the name mangling formats allow for
-an inifinite level of recursion it is possible to create strings whose
+an infinite level of recursion it is possible to create strings whose
decoding will exhaust the amount of stack space available on the host
machine, triggering a memory fault. The limit tries to prevent this
from happening by restricting recursion to 2048 levels of nesting.
@kindex addr2line
@cindex address to file name and line number
-@c man title addr2line convert addresses into file names and line numbers
+@c man title addr2line convert addresses or symbol+offset into file names and line numbers
@smallexample
@c man begin SYNOPSIS addr2line
@c man begin DESCRIPTION addr2line
-@command{addr2line} translates addresses into file names and line numbers.
-Given an address in an executable or an offset in a section of a relocatable
+@command{addr2line} translates addresses or symbol+offset into file names and line numbers.
+Given an address or symbol+offset in an executable or an offset in a section of a relocatable
object, it uses the debugging information to figure out which file name and
line number are associated with it.
@command{addr2line} has two modes of operation.
-In the first, hexadecimal addresses are specified on the command line,
+In the first, hexadecimal addresses or symbol+offset are specified on the command line,
and @command{addr2line} displays the file name and line number for each
address.
-In the second, @command{addr2line} reads hexadecimal addresses from
+In the second, @command{addr2line} reads hexadecimal addresses or symbol+offset from
standard input, and prints the file name and line number for each
address on standard output. In this mode, @command{addr2line} may be used
in a pipe to convert dynamically chosen addresses.
@command{addr2line} will print two question marks in their place. If the
line number can not be determined, @command{addr2line} will print 0.
+When symbol+offset is used, +offset is optional, except when the symbol
+is ambigious with a hex number. The resolved symbols can be mangled
+or unmangled, except unmangled symbols with + are not allowed.
+
@c man end
@c man begin OPTIONS addr2line
@itemx --no-recursion-limit
Enables or disables a limit on the amount of recursion performed
whilst demangling strings. Since the name mangling formats allow for
-an inifinite level of recursion it is possible to create strings whose
+an infinite level of recursion it is possible to create strings whose
decoding will exhaust the amount of stack space available on the host
machine, triggering a memory fault. The limit tries to prevent this
from happening by restricting recursion to 2048 levels of nesting.
@item --preprocessor @var{program}
When @command{windres} reads an @code{rc} file, it runs it through the C
preprocessor first. This option may be used to specify the preprocessor
-to use, including any leading arguments. The default preprocessor
-argument is @code{gcc -E -xc-header -DRC_INVOKED}.
+to use. The default preprocessor is @code{gcc}.
@item --preprocessor-arg @var{option}
When @command{windres} reads an @code{rc} file, it runs it through
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.
+If the @option{--preprocessor} option has not been specified then a
+default set of preprocessor arguments will be used, with any
+@option{--preprocessor-arg} options being placed after them on the
+command line. These default arguments are @code{-E},
+@code{-xc-header} and @code{-DRC_INVOKED}.
@item -I @var{directory}
@itemx --include-dir @var{directory}
[@option{-v}|@option{--verbose}]
[@option{-h}|@option{--help}] [@option{-V}|@option{--version}]
[@option{--no-leading-underscore}] [@option{--leading-underscore}]
+ [@option{--deterministic-libraries}] [@option{--non-deterministic-libraries}]
[object-file @dots{}]
@c man end
@end smallexample
@itemx --output-delaylib @var{filename}
Specifies the name of the delay-import library file to be created by dlltool.
+@item --deterministic-libraries
+@itemx --non-deterministic-libraries
+When creating output libraries in response to either the
+@option{--output-lib} or @option{--output-delaylib} options either use
+the value of zero for any timestamps, user ids and group ids created
+(@option{--deterministic-libraries}) or the actual timestamps, user
+ids and group ids (@option{--non-deterministic-libraries}).
+
@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
[@option{-t}|@option{--section-details}]
[@option{-e}|@option{--headers}]
[@option{-s}|@option{--syms}|@option{--symbols}]
- [@option{--dyn-syms}]
+ [@option{--dyn-syms}|@option{--lto-syms}]
+ [@option{--sym-base=[0|8|10|16]}]
[@option{--demangle@var{=style}}|@option{--no-demangle}]
+ [@option{--quiet}]
[@option{--recurse-limit}|@option{--no-recurse-limit}]
+ [@option{-U} @var{method}|@option{--unicode=}@var{method}]
[@option{-n}|@option{--notes}]
[@option{-r}|@option{--relocs}]
[@option{-u}|@option{--unwind}]
[@option{-R} <number or name>|@option{--relocated-dump=}<number or name>]
[@option{-z}|@option{--decompress}]
[@option{-c}|@option{--archive-index}]
- [@option{-w[lLiaprmfFsoORtUuTgAckK]}|
- @option{--debug-dump}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]]
+ [@option{-w[lLiaprmfFsoORtUuTgAck]}|
+ @option{--debug-dump}[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links]]
+ [@option{-wK}|@option{--debug-dump=follow-links}]
+ [@option{-wN}|@option{--debug-dump=no-follow-links}]
+ [@option{-wD}|@option{--debug-dump=use-debuginfod}]
+ [@option{-wE}|@option{--debug-dump=do-not-use-debuginfod}]
+ [@option{-P}|@option{--process-links}]
[@option{--dwarf-depth=@var{n}}]
[@option{--dwarf-start=@var{n}}]
[@option{--ctf=}@var{section}]
[@option{--ctf-parent=}@var{section}]
[@option{--ctf-symbols=}@var{section}]
[@option{--ctf-strings=}@var{section}]
+ [@option{--sframe=}@var{section}]
[@option{-I}|@option{--histogram}]
[@option{-v}|@option{--version}]
[@option{-W}|@option{--wide}]
Displays the information contained in the file's segment headers, if it
has any.
+@item --quiet
+@cindex quiet
+Suppress "no symbols" diagnostic.
+
@item -S
@itemx --sections
@itemx --section-headers
has one. The output format is the same as the format used by the
@option{--syms} option.
+@item --lto-syms
+@cindex LTO symbol table
+Displays the contents of any LTO symbol tables in the file.
+
+@item --sym-base=[0|8|10|16]
+@cindex symbol table size base
+Forces the size field of the symbol table to use the given base. Any
+unrecognized options will be treated as @samp{0}. @option{--sym-base=0}
+represents the default and legacy behaviour. This will output sizes as decimal
+for numbers less than 100000. For sizes 100000 and greater hexadecimal notation
+will be used with a 0x prefix.
+@option{--sym-base=8} will give the symbol sizes in octal.
+@option{--sym-base=10} will always give the symbol sizes in decimal.
+@option{--sym-base=16} will always give the symbol sizes in hexadecimal with a
+0x prefix.
+
@item -C
@itemx --demangle[=@var{style}]
@cindex demangling in nm
@itemx --no-recursion-limit
Enables or disables a limit on the amount of recursion performed
whilst demangling strings. Since the name mangling formats allow for
-an inifinite level of recursion it is possible to create strings whose
+an infinite level of recursion it is possible to create strings whose
decoding will exhaust the amount of stack space available on the host
machine, triggering a memory fault. The limit tries to prevent this
from happening by restricting recursion to 2048 levels of nesting.
that if the recursion limit is disabled then stack exhaustion is
possible and any bug reports about such an event will be rejected.
+@item -U @var{[d|i|l|e|x|h]}
+@itemx --unicode=[default|invalid|locale|escape|hex|highlight]
+Controls the display of non-ASCII characters in identifier names.
+The default (@option{--unicode=locale} or @option{--unicode=default}) is
+to treat them as multibyte characters and display them in the current
+locale. All other versions of this option treat the bytes as UTF-8
+encoded values and attempt to interpret them. If they cannot be
+interpreted or if the @option{--unicode=invalid} option is used then
+they are displayed as a sequence of hex bytes, encloses in curly
+parethesis characters.
+
+Using the @option{--unicode=escape} option will display the characters
+as as unicode escape sequences (@var{\uxxxx}). Using the
+@option{--unicode=hex} will display the characters as hex byte
+sequences enclosed between angle brackets.
+
+Using the @option{--unicode=highlight} will display the characters as
+unicode escape sequences but it will also highlighted them in red,
+assuming that colouring is supported by the output device. The
+colouring is intended to draw attention to the presence of unicode
+sequences when they might not be expected.
+
@item -e
@itemx --headers
Display all the headers in the file. Equivalent to @option{-h -l -S}.
@itemx --debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=str-offsets,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges,=gdb_index,=addr,=cu_index,=links,=follow-links]
@include debug.options.texi
+@item -P
+@itemx --process-links
+Display the contents of non-debug sections found in separate debuginfo
+files that are linked to the main file. This option automatically
+implies the @option{-wK} option, and only sections requested by other
+command line options will be displayed.
+
@include ctf.options.texi
@item --ctf-symbols=@var{section}
@item --ctf-strings=@var{section}
elfedit [@option{--input-mach=}@var{machine}]
[@option{--input-type=}@var{type}]
[@option{--input-osabi=}@var{osabi}]
+ [@option{--input-abiversion=}@var{version}]
@option{--output-mach=}@var{machine}
@option{--output-type=}@var{type}
@option{--output-osabi=}@var{osabi}
+ @option{--output-abiversion=}@var{version}
@option{--enable-x86-feature=}@var{feature}
@option{--disable-x86-feature=}@var{feature}
[@option{-v}|@option{--version}]
The long and short forms of options, shown here as alternatives, are
equivalent. At least one of the @option{--output-mach},
@option{--output-type}, @option{--output-osabi},
+@option{--output-abiversion},
@option{--enable-x86-feature} and @option{--disable-x86-feature}
options must be given.
Change the ELF OSABI in the ELF header to @var{osabi}. The
supported ELF OSABI are the same as @option{--input-osabi}.
+@item --input-abiversion=@var{version}
+Set the matching input ELF file ABIVERSION to @var{version}.
+@var{version} must be between 0 and 255. If @option{--input-abiversion}
+isn't specified, it will match any ELF ABIVERSIONs.
+
+@item --output-abiversion=@var{version}
+Change the ELF ABIVERSION in the ELF header to @var{version}.
+@var{version} must be between 0 and 255.
+
@item --enable-x86-feature=@var{feature}
Set the @var{feature} bit in program property in @var{exec} or @var{dyn}
ELF files with machine types of @var{i386} or @var{x86-64}. The
-supported features are, @var{ibt} and @var{shstk}.
+supported features are, @var{ibt}, @var{shstk}, @var{lam_u48} and
+@var{lam_u57}.
@item --disable-x86-feature=@var{feature}
Clear the @var{feature} bit in program property in @var{exec} or
@cindex separate debug files
debuginfod is a web service that indexes ELF/DWARF debugging resources
-by build-id and serves them over HTTP.
+by build-id and serves them over HTTP. For more information see:
+@emph{https://sourceware.org/elfutils/Debuginfod.html}
Binutils can be built with the debuginfod client library
@code{libdebuginfod} using the @option{--with-debuginfod} configure option.
debuginfod is packaged with elfutils, starting with version 0.178.
You can get the latest version from `https://sourceware.org/elfutils/'.
+The DWARF info dumping tools (@command{readelf} and @command{objdump})
+have options to control when they should access the debuginfod
+servers. By default this access is enabled.
+
@node Reporting Bugs
@chapter Reporting Bugs
@cindex bugs