diff options
author | alk3pInjection <webmaster@raspii.tech> | 2024-02-04 16:16:35 +0800 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2024-02-04 16:16:35 +0800 |
commit | abdaadbcae30fe0c9a66c7516798279fdfd97750 (patch) | |
tree | 00a54a6e25601e43876d03c1a4a12a749d4a914c /share/doc/binutils.html |
https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
Change-Id: I7303388733328cd98ab9aa3c30236db67f2e9e9c
Diffstat (limited to 'share/doc/binutils.html')
-rw-r--r-- | share/doc/binutils.html | 7515 |
1 files changed, 7515 insertions, 0 deletions
diff --git a/share/doc/binutils.html b/share/doc/binutils.html new file mode 100644 index 0000000..0f1e772 --- /dev/null +++ b/share/doc/binutils.html @@ -0,0 +1,7515 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> +<!-- Copyright (C) 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 +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". + --> +<!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ --> +<head> +<title>GNU Binary Utilities</title> + +<meta name="description" content="GNU Binary Utilities"> +<meta name="keywords" content="GNU Binary Utilities"> +<meta name="resource-type" content="document"> +<meta name="distribution" content="global"> +<meta name="Generator" content="makeinfo"> +<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> +<link href="#Top" rel="start" title="Top"> +<link href="#Binutils-Index" rel="index" title="Binutils Index"> +<link href="#SEC_Contents" rel="contents" title="Table of Contents"> +<link href="dir.html#Top" rel="up" title="(dir)"> +<style type="text/css"> +<!-- +a.summary-letter {text-decoration: none} +blockquote.smallquotation {font-size: smaller} +div.display {margin-left: 3.2em} +div.example {margin-left: 3.2em} +div.indentedblock {margin-left: 3.2em} +div.lisp {margin-left: 3.2em} +div.smalldisplay {margin-left: 3.2em} +div.smallexample {margin-left: 3.2em} +div.smallindentedblock {margin-left: 3.2em; font-size: smaller} +div.smalllisp {margin-left: 3.2em} +kbd {font-style:oblique} +pre.display {font-family: inherit} +pre.format {font-family: inherit} +pre.menu-comment {font-family: serif} +pre.menu-preformatted {font-family: serif} +pre.smalldisplay {font-family: inherit; font-size: smaller} +pre.smallexample {font-size: smaller} +pre.smallformat {font-family: inherit; font-size: smaller} +pre.smalllisp {font-size: smaller} +span.nocodebreak {white-space:nowrap} +span.nolinebreak {white-space:nowrap} +span.roman {font-family:serif; font-weight:normal} +span.sansserif {font-family:sans-serif; font-weight:normal} +ul.no-bullet {list-style: none} +--> +</style> + + +</head> + +<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"> +<h1 class="settitle" align="center"><small>GNU</small> Binary Utilities</h1> + + + + + +<a name="SEC_Contents"></a> +<h2 class="contents-heading">Table of Contents</h2> + +<div class="contents"> + +<ul class="no-bullet"> + <li><a name="toc-ar-1" href="#ar">1 ar</a> + <ul class="no-bullet"> + <li><a name="toc-Controlling-ar-on-the-Command-Line" href="#ar-cmdline">1.1 Controlling <code>ar</code> on the Command Line</a></li> + <li><a name="toc-Controlling-ar-with-a-Script" href="#ar-scripts">1.2 Controlling <code>ar</code> with a Script</a></li> + </ul></li> + <li><a name="toc-nm-1" href="#nm">2 nm</a></li> + <li><a name="toc-objcopy-1" href="#objcopy">3 objcopy</a></li> + <li><a name="toc-objdump-1" href="#objdump">4 objdump</a></li> + <li><a name="toc-ranlib-1" href="#ranlib">5 ranlib</a></li> + <li><a name="toc-size-1" href="#size">6 size</a></li> + <li><a name="toc-strings-1" href="#strings">7 strings</a></li> + <li><a name="toc-strip-1" href="#strip">8 strip</a></li> + <li><a name="toc-c_002b_002bfilt-1" href="#c_002b_002bfilt">9 c++filt</a></li> + <li><a name="toc-addr2line-1" href="#addr2line">10 addr2line</a></li> + <li><a name="toc-windmc-1" href="#windmc">11 windmc</a></li> + <li><a name="toc-windres-1" href="#windres">12 windres</a></li> + <li><a name="toc-dlltool-1" href="#dlltool">13 dlltool</a> + <ul class="no-bullet"> + <li><a name="toc-The-format-of-the-dlltool-_002edef-file" href="#def-file-format">13.1 The format of the <code>dlltool</code> <samp>.def</samp> file</a></li> + </ul></li> + <li><a name="toc-readelf-1" href="#readelf">14 readelf</a></li> + <li><a name="toc-elfedit-1" href="#elfedit">15 elfedit</a></li> + <li><a name="toc-Common-Options-1" href="#Common-Options">16 Common Options</a></li> + <li><a name="toc-Selecting-the-Target-System-1" href="#Selecting-the-Target-System">17 Selecting the Target System</a> + <ul class="no-bullet"> + <li><a name="toc-Target-Selection-1" href="#Target-Selection">17.1 Target Selection</a></li> + <li><a name="toc-Architecture-Selection-1" href="#Architecture-Selection">17.2 Architecture Selection</a></li> + </ul></li> + <li><a name="toc-debuginfod-1" href="#debuginfod">18 debuginfod</a></li> + <li><a name="toc-Reporting-Bugs-1" href="#Reporting-Bugs">19 Reporting Bugs</a> + <ul class="no-bullet"> + <li><a name="toc-Have-You-Found-a-Bug_003f" href="#Bug-Criteria">19.1 Have You Found a Bug?</a></li> + <li><a name="toc-How-to-Report-Bugs" href="#Bug-Reporting">19.2 How to Report Bugs</a></li> + </ul></li> + <li><a name="toc-GNU-Free-Documentation-License-1" href="#GNU-Free-Documentation-License">Appendix A GNU Free Documentation License</a></li> + <li><a name="toc-Binutils-Index-1" href="#Binutils-Index">Binutils Index</a></li> +</ul> +</div> + + +<a name="Top"></a> +<div class="header"> +<p> +Next: <a href="#ar" accesskey="n" rel="next">ar</a>, Up: <a href="dir.html#Top" accesskey="u" rel="up">(dir)</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="Introduction"></a> +<h1 class="top">Introduction</h1> + +<a name="index-version"></a> +<p>This brief manual contains documentation for the <small>GNU</small> binary +utilities +(Arm GNU Toolchain 13.2.rel1 (Build arm-13.7)) +version 2.41.0: +</p> + +<p>This document is distributed under the terms of the GNU Free +Documentation License version 1.3. A copy of the license is included +in the section entitled “GNU Free Documentation License”. +</p> +<table class="menu" border="0" cellspacing="0"> +<tr><td align="left" valign="top">• <a href="#ar" accesskey="1">ar</a>:</td><td> </td><td align="left" valign="top">Create, modify, and extract from archives +</td></tr> +<tr><td align="left" valign="top">• <a href="#nm" accesskey="2">nm</a>:</td><td> </td><td align="left" valign="top">List symbols from object files +</td></tr> +<tr><td align="left" valign="top">• <a href="#objcopy" accesskey="3">objcopy</a>:</td><td> </td><td align="left" valign="top">Copy and translate object files +</td></tr> +<tr><td align="left" valign="top">• <a href="#objdump" accesskey="4">objdump</a>:</td><td> </td><td align="left" valign="top">Display information from object files +</td></tr> +<tr><td align="left" valign="top">• <a href="#ranlib" accesskey="5">ranlib</a>:</td><td> </td><td align="left" valign="top">Generate index to archive contents +</td></tr> +<tr><td align="left" valign="top">• <a href="#size" accesskey="6">size</a>:</td><td> </td><td align="left" valign="top">List section sizes and total size +</td></tr> +<tr><td align="left" valign="top">• <a href="#strings" accesskey="7">strings</a>:</td><td> </td><td align="left" valign="top">List printable strings from files +</td></tr> +<tr><td align="left" valign="top">• <a href="#strip" accesskey="8">strip</a>:</td><td> </td><td align="left" valign="top">Discard symbols +</td></tr> +<tr><td align="left" valign="top">• <a href="#c_002b_002bfilt" accesskey="9">c++filt</a>:</td><td> </td><td align="left" valign="top">Filter to demangle encoded C++ symbols +</td></tr> +<tr><td align="left" valign="top">• <a href="#c_002b_002bfilt">cxxfilt</a>:</td><td> </td><td align="left" valign="top">MS-DOS name for c++filt +</td></tr> +<tr><td align="left" valign="top">• <a href="#addr2line">addr2line</a>:</td><td> </td><td align="left" valign="top">Convert addresses or symbol+offset to file and line +</td></tr> +<tr><td align="left" valign="top">• <a href="#windmc">windmc</a>:</td><td> </td><td align="left" valign="top">Generator for Windows message resources +</td></tr> +<tr><td align="left" valign="top">• <a href="#windres">windres</a>:</td><td> </td><td align="left" valign="top">Manipulate Windows resources +</td></tr> +<tr><td align="left" valign="top">• <a href="#dlltool">dlltool</a>:</td><td> </td><td align="left" valign="top">Create files needed to build and use DLLs +</td></tr> +<tr><td align="left" valign="top">• <a href="#readelf">readelf</a>:</td><td> </td><td align="left" valign="top">Display the contents of ELF format files +</td></tr> +<tr><td align="left" valign="top">• <a href="#elfedit">elfedit</a>:</td><td> </td><td align="left" valign="top">Update ELF header and property of ELF files +</td></tr> +<tr><td align="left" valign="top">• <a href="#Common-Options">Common Options</a>:</td><td> </td><td align="left" valign="top">Command-line options for all utilities +</td></tr> +<tr><td align="left" valign="top">• <a href="#Selecting-the-Target-System">Selecting the Target System</a>:</td><td> </td><td align="left" valign="top">How these utilities determine the target +</td></tr> +<tr><td align="left" valign="top">• <a href="#debuginfod">debuginfod</a>:</td><td> </td><td align="left" valign="top">Using binutils with debuginfod +</td></tr> +<tr><td align="left" valign="top">• <a href="#Reporting-Bugs">Reporting Bugs</a>:</td><td> </td><td align="left" valign="top">Reporting Bugs +</td></tr> +<tr><td align="left" valign="top">• <a href="#GNU-Free-Documentation-License">GNU Free Documentation License</a>:</td><td> </td><td align="left" valign="top">GNU Free Documentation License +</td></tr> +<tr><td align="left" valign="top">• <a href="#Binutils-Index">Binutils Index</a>:</td><td> </td><td align="left" valign="top">Binutils Index +</td></tr> +</table> + +<hr> +<a name="ar"></a> +<div class="header"> +<p> +Next: <a href="#nm" accesskey="n" rel="next">nm</a>, Previous: <a href="#Top" accesskey="p" rel="previous">Top</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="ar-1"></a> +<h2 class="chapter">1 ar</h2> + +<a name="index-ar"></a> +<a name="index-archives"></a> +<a name="index-collections-of-files"></a> + + +<div class="smallexample"> +<pre class="smallexample">ar [-]<var>p</var>[<var>mod</var>] [<samp>--plugin</samp> <var>name</var>] [<samp>--target</samp> <var>bfdname</var>] [<samp>--output</samp> <var>dirname</var>] [<samp>--record-libdeps</samp> <var>libdeps</var>] [<var>relpos</var>] [<var>count</var>] <var>archive</var> [<var>member</var>…] +ar -M [ <mri-script ] +</pre></div> + + +<p>The <small>GNU</small> <code>ar</code> program creates, modifies, and extracts from +archives. An <em>archive</em> is a single file holding a collection of +other files in a structure that makes it possible to retrieve +the original individual files (called <em>members</em> of the archive). +</p> +<p>The original files’ contents, mode (permissions), timestamp, owner, and +group are preserved in the archive, and can be restored on +extraction. +</p> +<a name="index-name-length"></a> +<p><small>GNU</small> <code>ar</code> can maintain archives whose members have names of any +length; however, depending on how <code>ar</code> is configured on your +system, a limit on member-name length may be imposed for compatibility +with archive formats maintained with other tools. If it exists, the +limit is often 15 characters (typical of formats related to a.out) or 16 +characters (typical of formats related to coff). +</p> +<a name="index-libraries"></a> +<p><code>ar</code> is considered a binary utility because archives of this sort +are most often used as <em>libraries</em> holding commonly needed +subroutines. Since libraries often will depend on other libraries, +<code>ar</code> can also record the dependencies of a library when the +<samp>--record-libdeps</samp> option is specified. +</p> +<a name="index-symbol-index"></a> +<p><code>ar</code> creates an index to the symbols defined in relocatable +object modules in the archive when you specify the modifier ‘<samp>s</samp>’. +Once created, this index is updated in the archive whenever <code>ar</code> +makes a change to its contents (save for the ‘<samp>q</samp>’ update operation). +An archive with such an index speeds up linking to the library, and +allows routines in the library to call each other without regard to +their placement in the archive. +</p> +<p>You may use ‘<samp>nm -s</samp>’ or ‘<samp>nm --print-armap</samp>’ to list this index +table. If an archive lacks the table, another form of <code>ar</code> called +<code>ranlib</code> can be used to add just the table. +</p> +<a name="index-thin-archives"></a> +<p><small>GNU</small> <code>ar</code> can optionally create a <em>thin</em> archive, +which contains a symbol index and references to the original copies +of the member files of the archive. This is useful for building +libraries for use within a local build tree, where the relocatable +objects are expected to remain available, and copying the contents of +each object would only waste time and space. +</p> +<p>An archive can either be <em>thin</em> or it can be normal. It cannot +be both at the same time. Once an archive is created its format +cannot be changed without first deleting it and then creating a new +archive in its place. +</p> +<p>Thin archives are also <em>flattened</em>, so that adding one thin +archive to another thin archive does not nest it, as would happen with +a normal archive. Instead the elements of the first archive are added +individually to the second archive. +</p> +<p>The paths to the elements of the archive are stored relative to the +archive itself. +</p> +<a name="index-compatibility_002c-ar"></a> +<a name="index-ar-compatibility"></a> +<p><small>GNU</small> <code>ar</code> is designed to be compatible with two different +facilities. You can control its activity using command-line options, +like the different varieties of <code>ar</code> on Unix systems; or, if you +specify the single command-line option <samp>-M</samp>, you can control it +with a script supplied via standard input, like the MRI “librarian” +program. +</p> + +<table class="menu" border="0" cellspacing="0"> +<tr><td align="left" valign="top">• <a href="#ar-cmdline" accesskey="1">ar cmdline</a>:</td><td> </td><td align="left" valign="top">Controlling <code>ar</code> on the command line +</td></tr> +<tr><td align="left" valign="top">• <a href="#ar-scripts" accesskey="2">ar scripts</a>:</td><td> </td><td align="left" valign="top">Controlling <code>ar</code> with a script +</td></tr> +</table> + +<hr> +<a name="ar-cmdline"></a> +<div class="header"> +<p> +Next: <a href="#ar-scripts" accesskey="n" rel="next">ar scripts</a>, Up: <a href="#ar" accesskey="u" rel="up">ar</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="Controlling-ar-on-the-Command-Line"></a> +<h3 class="section">1.1 Controlling <code>ar</code> on the Command Line</h3> + +<div class="smallexample"> +<pre class="smallexample">ar [<samp>-X32_64</samp>] [<samp>-</samp>]<var>p</var>[<var>mod</var>] [<samp>--plugin</samp> <var>name</var>] [<samp>--target</samp> <var>bfdname</var>] [<samp>--output</samp> <var>dirname</var>] [<samp>--record-libdeps</samp> <var>libdeps</var>] [<samp>--thin</samp>] [<var>relpos</var>] [<var>count</var>] <var>archive</var> [<var>member</var>…] +</pre></div> + +<a name="index-Unix-compatibility_002c-ar"></a> +<p>When you use <code>ar</code> in the Unix style, <code>ar</code> insists on at least two +arguments to execute: one keyletter specifying the <em>operation</em> +(optionally accompanied by other keyletters specifying +<em>modifiers</em>), and the archive name to act on. +</p> +<p>Most operations can also accept further <var>member</var> arguments, +specifying particular files to operate on. +</p> + +<p><small>GNU</small> <code>ar</code> allows you to mix the operation code <var>p</var> and modifier +flags <var>mod</var> in any order, within the first command-line argument. +</p> +<p>If you wish, you may begin the first command-line argument with a +dash. +</p> +<a name="index-operations-on-archive"></a> +<p>The <var>p</var> keyletter specifies what operation to execute; it may be +any of the following, but you must specify only one of them: +</p> +<dl compact="compact"> +<dt>‘<samp>d</samp>’</dt> +<dd><a name="index-deleting-from-archive"></a> +<p><em>Delete</em> modules from the archive. Specify the names of modules to +be deleted as <var>member</var>…; the archive is untouched if you +specify no files to delete. +</p> +<p>If you specify the ‘<samp>v</samp>’ modifier, <code>ar</code> lists each module +as it is deleted. +</p> +</dd> +<dt>‘<samp>m</samp>’</dt> +<dd><a name="index-moving-in-archive"></a> +<p>Use this operation to <em>move</em> members in an archive. +</p> +<p>The ordering of members in an archive can make a difference in how +programs are linked using the library, if a symbol is defined in more +than one member. +</p> +<p>If no modifiers are used with <code>m</code>, any members you name in the +<var>member</var> arguments are moved to the <em>end</em> of the archive; +you can use the ‘<samp>a</samp>’, ‘<samp>b</samp>’, or ‘<samp>i</samp>’ modifiers to move them to a +specified place instead. +</p> +</dd> +<dt>‘<samp>p</samp>’</dt> +<dd><a name="index-printing-from-archive"></a> +<p><em>Print</em> the specified members of the archive, to the standard +output file. If the ‘<samp>v</samp>’ modifier is specified, show the member +name before copying its contents to standard output. +</p> +<p>If you specify no <var>member</var> arguments, all the files in the archive are +printed. +</p> +</dd> +<dt>‘<samp>q</samp>’</dt> +<dd><a name="index-quick-append-to-archive"></a> +<p><em>Quick append</em>; Historically, add the files <var>member</var>… to the end of +<var>archive</var>, without checking for replacement. +</p> +<p>The modifiers ‘<samp>a</samp>’, ‘<samp>b</samp>’, and ‘<samp>i</samp>’ do <em>not</em> affect this +operation; new members are always placed at the end of the archive. +</p> +<p>The modifier ‘<samp>v</samp>’ makes <code>ar</code> list each file as it is appended. +</p> +<p>Since the point of this operation is speed, implementations of +<code>ar</code> have the option of not updating the archive’s symbol +table if one exists. Too many different systems however assume that +symbol tables are always up-to-date, so <small>GNU</small> <code>ar</code> will +rebuild the table even with a quick append. +</p> +<p>Note - <small>GNU</small> <code>ar</code> treats the command ‘<samp>qs</samp>’ as a +synonym for ‘<samp>r</samp>’ - replacing already existing files in the +archive and appending new ones at the end. +</p> +</dd> +<dt>‘<samp>r</samp>’</dt> +<dd><a name="index-replacement-in-archive"></a> +<p>Insert the files <var>member</var>… into <var>archive</var> (with +<em>replacement</em>). This operation differs from ‘<samp>q</samp>’ in that any +previously existing members are deleted if their names match those being +added. +</p> +<p>If one of the files named in <var>member</var>… does not exist, <code>ar</code> +displays an error message, and leaves undisturbed any existing members +of the archive matching that name. +</p> +<p>By default, new members are added at the end of the file; but you may +use one of the modifiers ‘<samp>a</samp>’, ‘<samp>b</samp>’, or ‘<samp>i</samp>’ to request +placement relative to some existing member. +</p> +<p>The modifier ‘<samp>v</samp>’ used with this operation elicits a line of +output for each file inserted, along with one of the letters ‘<samp>a</samp>’ or +‘<samp>r</samp>’ to indicate whether the file was appended (no old member +deleted) or replaced. +</p> +</dd> +<dt>‘<samp>s</samp>’</dt> +<dd><a name="index-ranlib"></a> +<p>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. +</p> +</dd> +<dt>‘<samp>t</samp>’</dt> +<dd><a name="index-contents-of-archive"></a> +<p>Display a <em>table</em> listing the contents of <var>archive</var>, or those +of the files listed in <var>member</var>… that are present in the +archive. Normally only the member name is shown, but if the modifier +‘<samp>O</samp>’ is specified, then the corresponding offset of the member is also +displayed. Finally, in order to see the modes (permissions), timestamp, +owner, group, and size the ‘<samp>v</samp>’ modifier should be included. +</p> +<p>If you do not specify a <var>member</var>, all files in the archive +are listed. +</p> +<a name="index-repeated-names-in-archive"></a> +<a name="index-name-duplication-in-archive"></a> +<p>If there is more than one file with the same name (say, ‘<samp>fie</samp>’) in +an archive (say ‘<samp>b.a</samp>’), ‘<samp>ar t b.a fie</samp>’ lists only the +first instance; to see them all, you must ask for a complete +listing—in our example, ‘<samp>ar t b.a</samp>’. +</p> +</dd> +<dt>‘<samp>x</samp>’</dt> +<dd><a name="index-extract-from-archive"></a> +<p><em>Extract</em> members (named <var>member</var>) from the archive. You can +use the ‘<samp>v</samp>’ modifier with this operation, to request that +<code>ar</code> list each name as it extracts it. +</p> +<p>If you do not specify a <var>member</var>, all files in the archive +are extracted. +</p> +<p>Files cannot be extracted from a thin archive, and there are +restrictions on extracting from archives created with <samp>P</samp>: The +paths must not be absolute, may not contain <code>..</code>, and any +subdirectories in the paths must exist. If it is desired to avoid +these restrictions then used the <samp>--output</samp> option to specify +an output directory. +</p></dd> +</dl> + +<p>A number of modifiers (<var>mod</var>) may immediately follow the <var>p</var> +keyletter, to specify variations on an operation’s behavior: +</p> +<dl compact="compact"> +<dt>‘<samp>a</samp>’</dt> +<dd><a name="index-relative-placement-in-archive"></a> +<p>Add new files <em>after</em> an existing member of the +archive. If you use the modifier ‘<samp>a</samp>’, the name of an existing archive +member must be present as the <var>relpos</var> argument, before the +<var>archive</var> specification. +</p> +</dd> +<dt>‘<samp>b</samp>’</dt> +<dd><p>Add new files <em>before</em> an existing member of the +archive. If you use the modifier ‘<samp>b</samp>’, the name of an existing archive +member must be present as the <var>relpos</var> argument, before the +<var>archive</var> specification. (same as ‘<samp>i</samp>’). +</p> +</dd> +<dt>‘<samp>c</samp>’</dt> +<dd><a name="index-creating-archives"></a> +<p><em>Create</em> the archive. The specified <var>archive</var> is always +created if it did not exist, when you request an update. But a warning is +issued unless you specify in advance that you expect to create it, by +using this modifier. +</p> +</dd> +<dt>‘<samp>D</samp>’</dt> +<dd><a name="index-deterministic-archives"></a> +<a name="index-_002d_002denable_002ddeterministic_002darchives"></a> +<p>Operate in <em>deterministic</em> 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 <code>ar</code> 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. +</p> +<p>If <samp>binutils</samp> was configured with +<samp>--enable-deterministic-archives</samp>, then this mode is on by default. +It can be disabled with the ‘<samp>U</samp>’ modifier, below. +</p> +</dd> +<dt>‘<samp>f</samp>’</dt> +<dd><p>Truncate names in the archive. <small>GNU</small> <code>ar</code> will normally permit file +names of any length. This will cause it to create archives which are +not compatible with the native <code>ar</code> program on some systems. If +this is a concern, the ‘<samp>f</samp>’ modifier may be used to truncate file +names when putting them in the archive. +</p> +</dd> +<dt>‘<samp>i</samp>’</dt> +<dd><p>Insert new files <em>before</em> an existing member of the +archive. If you use the modifier ‘<samp>i</samp>’, the name of an existing archive +member must be present as the <var>relpos</var> argument, before the +<var>archive</var> specification. (same as ‘<samp>b</samp>’). +</p> +</dd> +<dt>‘<samp>l</samp>’</dt> +<dd><p>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"</samp>’ +</p> +</dd> +<dt>‘<samp>N</samp>’</dt> +<dd><p>Uses the <var>count</var> parameter. This is used if there are multiple +entries in the archive with the same name. Extract or delete instance +<var>count</var> of the given name from the archive. +</p> +</dd> +<dt>‘<samp>o</samp>’</dt> +<dd><a name="index-dates-in-archive"></a> +<p>Preserve the <em>original</em> dates of members when extracting them. If +you do not specify this modifier, files extracted from the archive +are stamped with the time of extraction. +</p> +</dd> +<dt>‘<samp>O</samp>’</dt> +<dd><a name="index-offsets-of-files"></a> +<p>Display member offsets inside the archive. Use together with the ‘<samp>t</samp>’ +option. +</p> +</dd> +<dt>‘<samp>P</samp>’</dt> +<dd><p>Use the full path name when matching or storing names in the archive. +Archives created with full path names are not POSIX compliant, and +thus may not work with tools other than up to date <small>GNU</small> tools. +Modifying such archives with <small>GNU</small> <code>ar</code> without using +<samp>P</samp> will remove the full path names unless the archive is a +thin archive. Note that <samp>P</samp> may be useful when adding files to +a thin archive since <samp>r</samp> without <samp>P</samp> ignores the path +when choosing which element to replace. Thus +</p><div class="smallexample"> +<pre class="smallexample">ar rcST archive.a subdir/file1 subdir/file2 file1 +</pre></div> +<p>will result in the first <code>subdir/file1</code> being replaced with +<code>file1</code> from the current directory. Adding <samp>P</samp> will +prevent this replacement. +</p> +</dd> +<dt>‘<samp>s</samp>’</dt> +<dd><a name="index-writing-archive-index"></a> +<p>Write an object-file index into the archive, or update an existing one, +even if no other change is made to the archive. You may use this modifier +flag either with any operation, or alone. Running ‘<samp>ar s</samp>’ on an +archive is equivalent to running ‘<samp>ranlib</samp>’ on it. +</p> +</dd> +<dt>‘<samp>S</samp>’</dt> +<dd><a name="index-not-writing-archive-index"></a> +<p>Do not generate an archive symbol table. This can speed up building a +large library in several steps. The resulting archive can not be used +with the linker. In order to build a symbol table, you must omit the +‘<samp>S</samp>’ modifier on the last execution of ‘<samp>ar</samp>’, or you must run +‘<samp>ranlib</samp>’ on the archive. +</p> +</dd> +<dt>‘<samp>T</samp>’</dt> +<dd><p>Deprecated alias for <samp>--thin</samp>. <samp>T</samp> is not recommended because in +many ar implementations <samp>T</samp> has a different meaning, as specified by +X/Open System Interface. +</p> +</dd> +<dt>‘<samp>u</samp>’</dt> +<dd><a name="index-updating-an-archive"></a> +<p>Normally, ‘<samp>ar r</samp>’… inserts all files +listed into the archive. If you would like to insert <em>only</em> those +of the files you list that are newer than existing members of the same +names, use this modifier. The ‘<samp>u</samp>’ modifier is allowed only for the +operation ‘<samp>r</samp>’ (replace). In particular, the combination ‘<samp>qu</samp>’ is +not allowed, since checking the timestamps would lose any speed +advantage from the operation ‘<samp>q</samp>’. +</p> +</dd> +<dt>‘<samp>U</samp>’</dt> +<dd><a name="index-deterministic-archives-1"></a> +<a name="index-_002d_002denable_002ddeterministic_002darchives-1"></a> +<p>Do <em>not</em> operate in <em>deterministic</em> mode. This is the inverse +of the ‘<samp>D</samp>’ modifier, above: added files and the archive index will +get their actual UID, GID, timestamp, and file mode values. +</p> +<p>This is the default unless <samp>binutils</samp> was configured with +<samp>--enable-deterministic-archives</samp>. +</p> +</dd> +<dt>‘<samp>v</samp>’</dt> +<dd><p>This modifier requests the <em>verbose</em> version of an operation. Many +operations display additional information, such as filenames processed, +when the modifier ‘<samp>v</samp>’ is appended. +</p> +</dd> +<dt>‘<samp>V</samp>’</dt> +<dd><p>This modifier shows the version number of <code>ar</code>. +</p></dd> +</dl> + +<p>The <code>ar</code> program also supports some command-line options which +are neither modifiers nor actions, but which do change its behaviour +in specific ways: +</p> +<dl compact="compact"> +<dt>‘<samp>--help</samp>’</dt> +<dd><p>Displays the list of command-line options supported by <code>ar</code> +and then exits. +</p> +</dd> +<dt>‘<samp>--version</samp>’</dt> +<dd><p>Displays the version information of <code>ar</code> and then exits. +</p> +</dd> +<dt>‘<samp>-X32_64</samp>’</dt> +<dd><p><code>ar</code> ignores an initial option spelled ‘<samp>-X32_64</samp>’, for +compatibility with AIX. The behaviour produced by this option is the +default for <small>GNU</small> <code>ar</code>. <code>ar</code> does not support any +of the other ‘<samp>-X</samp>’ options; in particular, it does not support +<samp>-X32</samp> which is the default for AIX <code>ar</code>. +</p> +</dd> +<dt>‘<samp>--plugin <var>name</var></samp>’</dt> +<dd><a name="index-plugins"></a> +<p>The optional command-line switch <samp>--plugin <var>name</var></samp> causes +<code>ar</code> to load the plugin called <var>name</var> which adds support +for more file formats, including object files with link-time +optimization information. +</p> +<p>This option is only available if the toolchain has been built with +plugin support enabled. +</p> +<p>If <samp>--plugin</samp> is not provided, but plugin support has been +enabled then <code>ar</code> iterates over the files in +<samp>${libdir}/bfd-plugins</samp> in alphabetic order and the first +plugin that claims the object in question is used. +</p> +<p>Please note that this plugin search directory is <em>not</em> the one +used by <code>ld</code>’s <samp>-plugin</samp> option. In order to make +<code>ar</code> use the linker plugin it must be copied into the +<samp>${libdir}/bfd-plugins</samp> directory. For GCC based compilations +the linker plugin is called <samp>liblto_plugin.so.0.0.0</samp>. For Clang +based compilations it is called <samp>LLVMgold.so</samp>. The GCC plugin +is always backwards compatible with earlier versions, so it is +sufficient to just copy the newest one. +</p> +</dd> +<dt>‘<samp>--target <var>target</var></samp>’</dt> +<dd><p>The optional command-line switch <samp>--target <var>bfdname</var></samp> +specifies that the archive members are in an object code format +different from your system’s default format. See +See <a href="#Target-Selection">Target Selection</a>, for more information. +</p> +</dd> +<dt>‘<samp>--output <var>dirname</var></samp>’</dt> +<dd><p>The <samp>--output</samp> option can be used to specify a path to a +directory into which archive members should be extracted. If this +option is not specified then the current directory will be used. +</p> +<p>Note - although the presence of this option does imply a <samp>x</samp> +extraction operation that option must still be included on the command +line. +</p> +</dd> +<dt>‘<samp>--record-libdeps <var>libdeps</var></samp>’</dt> +<dd><p>The <samp>--record-libdeps</samp> option is identical to the <samp>l</samp> modifier, +just handled in long form. +</p> +</dd> +<dt>‘<samp>--thin</samp>’</dt> +<dd><a name="index-creating-thin-archive"></a> +<p>Make the specified <var>archive</var> a <em>thin</em> archive. If it already +exists and is a regular archive, the existing members must be present +in the same directory as <var>archive</var>. +</p> +</dd> +</dl> + + +<hr> +<a name="ar-scripts"></a> +<div class="header"> +<p> +Previous: <a href="#ar-cmdline" accesskey="p" rel="previous">ar cmdline</a>, Up: <a href="#ar" accesskey="u" rel="up">ar</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="Controlling-ar-with-a-Script"></a> +<h3 class="section">1.2 Controlling <code>ar</code> with a Script</h3> + +<div class="smallexample"> +<pre class="smallexample">ar -M [ <<var>script</var> ] +</pre></div> + +<a name="index-MRI-compatibility_002c-ar"></a> +<a name="index-scripts_002c-ar"></a> +<p>If you use the single command-line option ‘<samp>-M</samp>’ with <code>ar</code>, you +can control its operation with a rudimentary command language. This +form of <code>ar</code> operates interactively if standard input is coming +directly from a terminal. During interactive use, <code>ar</code> prompts for +input (the prompt is ‘<samp>AR ></samp>’), and continues executing even after +errors. If you redirect standard input to a script file, no prompts are +issued, and <code>ar</code> abandons execution (with a nonzero exit code) +on any error. +</p> +<p>The <code>ar</code> command language is <em>not</em> designed to be equivalent +to the command-line options; in fact, it provides somewhat less control +over archives. The only purpose of the command language is to ease the +transition to <small>GNU</small> <code>ar</code> for developers who already have scripts +written for the MRI “librarian” program. +</p> +<p>The syntax for the <code>ar</code> command language is straightforward: +</p><ul> +<li> commands are recognized in upper or lower case; for example, <code>LIST</code> +is the same as <code>list</code>. In the following descriptions, commands are +shown in upper case for clarity. + +</li><li> a single command may appear on each line; it is the first word on the +line. + +</li><li> empty lines are allowed, and have no effect. + +</li><li> comments are allowed; text after either of the characters ‘<samp>*</samp>’ +or ‘<samp>;</samp>’ is ignored. + +</li><li> Whenever you use a list of names as part of the argument to an <code>ar</code> +command, you can separate the individual names with either commas or +blanks. Commas are shown in the explanations below, for clarity. + +</li><li> ‘<samp>+</samp>’ is used as a line continuation character; if ‘<samp>+</samp>’ appears +at the end of a line, the text on the following line is considered part +of the current command. +</li></ul> + +<p>Here are the commands you can use in <code>ar</code> scripts, or when using +<code>ar</code> interactively. Three of them have special significance: +</p> +<p><code>OPEN</code> or <code>CREATE</code> specify a <em>current archive</em>, which is +a temporary file required for most of the other commands. +</p> +<p><code>SAVE</code> commits the changes so far specified by the script. Prior +to <code>SAVE</code>, commands affect only the temporary copy of the current +archive. +</p> +<dl compact="compact"> +<dt><code>ADDLIB <var>archive</var></code></dt> +<dt><code>ADDLIB <var>archive</var> (<var>module</var>, <var>module</var>, … <var>module</var>)</code></dt> +<dd><p>Add all the contents of <var>archive</var> (or, if specified, each named +<var>module</var> from <var>archive</var>) to the current archive. +</p> +<p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>. +</p> +</dd> +<dt><code>ADDMOD <var>member</var>, <var>member</var>, … <var>member</var></code></dt> +<dd><p>Add each named <var>member</var> as a module in the current archive. +</p> +<p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>. +</p> +</dd> +<dt><code>CLEAR</code></dt> +<dd><p>Discard the contents of the current archive, canceling the effect of +any operations since the last <code>SAVE</code>. May be executed (with no +effect) even if no current archive is specified. +</p> +</dd> +<dt><code>CREATE <var>archive</var></code></dt> +<dd><p>Creates an archive, and makes it the current archive (required for many +other commands). The new archive is created with a temporary name; it +is not actually saved as <var>archive</var> until you use <code>SAVE</code>. +You can overwrite existing archives; similarly, the contents of any +existing file named <var>archive</var> will not be destroyed until <code>SAVE</code>. +</p> +</dd> +<dt><code>DELETE <var>module</var>, <var>module</var>, … <var>module</var></code></dt> +<dd><p>Delete each listed <var>module</var> from the current archive; equivalent to +‘<samp>ar -d <var>archive</var> <var>module</var> … <var>module</var></samp>’. +</p> +<p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>. +</p> +</dd> +<dt><code>DIRECTORY <var>archive</var> (<var>module</var>, … <var>module</var>)</code></dt> +<dt><code>DIRECTORY <var>archive</var> (<var>module</var>, … <var>module</var>) <var>outputfile</var></code></dt> +<dd><p>List each named <var>module</var> present in <var>archive</var>. The separate +command <code>VERBOSE</code> specifies the form of the output: when verbose +output is off, output is like that of ‘<samp>ar -t <var>archive</var> +<var>module</var>…</samp>’. When verbose output is on, the listing is like +‘<samp>ar -tv <var>archive</var> <var>module</var>…</samp>’. +</p> +<p>Output normally goes to the standard output stream; however, if you +specify <var>outputfile</var> as a final argument, <code>ar</code> directs the +output to that file. +</p> +</dd> +<dt><code>END</code></dt> +<dd><p>Exit from <code>ar</code>, with a <code>0</code> exit code to indicate successful +completion. This command does not save the output file; if you have +changed the current archive since the last <code>SAVE</code> command, those +changes are lost. +</p> +</dd> +<dt><code>EXTRACT <var>module</var>, <var>module</var>, … <var>module</var></code></dt> +<dd><p>Extract each named <var>module</var> from the current archive, writing them +into the current directory as separate files. Equivalent to ‘<samp>ar -x +<var>archive</var> <var>module</var>…</samp>’. +</p> +<p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>. +</p> + +</dd> +<dt><code>LIST</code></dt> +<dd><p>Display full contents of the current archive, in “verbose” style +regardless of the state of <code>VERBOSE</code>. The effect is like ‘<samp>ar +tv <var>archive</var></samp>’. (This single command is a <small>GNU</small> <code>ar</code> +enhancement, rather than present for MRI compatibility.) +</p> +<p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>. +</p> +</dd> +<dt><code>OPEN <var>archive</var></code></dt> +<dd><p>Opens an existing archive for use as the current archive (required for +many other commands). Any changes as the result of subsequent commands +will not actually affect <var>archive</var> until you next use <code>SAVE</code>. +</p> +</dd> +<dt><code>REPLACE <var>module</var>, <var>module</var>, … <var>module</var></code></dt> +<dd><p>In the current archive, replace each existing <var>module</var> (named in +the <code>REPLACE</code> arguments) from files in the current working directory. +To execute this command without errors, both the file, and the module in +the current archive, must exist. +</p> +<p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>. +</p> +</dd> +<dt><code>VERBOSE</code></dt> +<dd><p>Toggle an internal flag governing the output from <code>DIRECTORY</code>. +When the flag is on, <code>DIRECTORY</code> output matches output from +‘<samp>ar -tv </samp>’…. +</p> +</dd> +<dt><code>SAVE</code></dt> +<dd><p>Commit your changes to the current archive, and actually save it as a +file with the name specified in the last <code>CREATE</code> or <code>OPEN</code> +command. +</p> +<p>Requires prior use of <code>OPEN</code> or <code>CREATE</code>. +</p> +</dd> +</dl> + + +<hr> +<a name="nm"></a> +<div class="header"> +<p> +Next: <a href="#objcopy" accesskey="n" rel="next">objcopy</a>, Previous: <a href="#ar" accesskey="p" rel="previous">ar</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="nm-1"></a> +<h2 class="chapter">2 nm</h2> +<a name="index-symbols"></a> +<a name="index-nm"></a> + + +<div class="smallexample"> +<pre class="smallexample">nm [<samp>-A</samp>|<samp>-o</samp>|<samp>--print-file-name</samp>] + [<samp>-a</samp>|<samp>--debug-syms</samp>] + [<samp>-B</samp>|<samp>--format=bsd</samp>] + [<samp>-C</samp>|<samp>--demangle</samp>[=<var>style</var>]] + [<samp>-D</samp>|<samp>--dynamic</samp>] + [<samp>-f</samp><var>format</var>|<samp>--format=</samp><var>format</var>] + [<samp>-g</samp>|<samp>--extern-only</samp>] + [<samp>-h</samp>|<samp>--help</samp>] + [<samp>--ifunc-chars=<var>CHARS</var></samp>] + [<samp>-j</samp>|<samp>--format=just-symbols</samp>] + [<samp>-l</samp>|<samp>--line-numbers</samp>] [<samp>--inlines</samp>] + [<samp>-n</samp>|<samp>-v</samp>|<samp>--numeric-sort</samp>] + [<samp>-P</samp>|<samp>--portability</samp>] + [<samp>-p</samp>|<samp>--no-sort</samp>] + [<samp>-r</samp>|<samp>--reverse-sort</samp>] + [<samp>-S</samp>|<samp>--print-size</samp>] + [<samp>-s</samp>|<samp>--print-armap</samp>] + [<samp>-t</samp> <var>radix</var>|<samp>--radix=</samp><var>radix</var>] + [<samp>-u</samp>|<samp>--undefined-only</samp>] + [<samp>-U</samp>|<samp>--defined-only</samp>] + [<samp>-V</samp>|<samp>--version</samp>] + [<samp>-W</samp>|<samp>--no-weak</samp>] + [<samp>-X 32_64</samp>] + [<samp>--no-demangle</samp>] + [<samp>--no-recurse-limit</samp>|<samp>--recurse-limit</samp>]] + [<samp>--plugin</samp> <var>name</var>] + [<samp>--size-sort</samp>] + [<samp>--special-syms</samp>] + [<samp>--synthetic</samp>] + [<samp>--target=</samp><var>bfdname</var>] + [<samp>--unicode=</samp><var>method</var>] + [<samp>--with-symbol-versions</samp>] + [<samp>--without-symbol-versions</samp>] + [<var>objfile</var>…] +</pre></div> + +<p><small>GNU</small> <code>nm</code> lists the symbols from object files <var>objfile</var>…. +If no object files are listed as arguments, <code>nm</code> assumes the file +<samp>a.out</samp>. +</p> +<p>For each symbol, <code>nm</code> shows: +</p> +<ul> +<li> The symbol value, in the radix selected by options (see below), or +hexadecimal by default. + +</li><li> 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 +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>, <code>v</code> and <code>w</code>). + +<dl compact="compact"> +<dt><code>A</code></dt> +<dd><p>The symbol’s value is absolute, and will not be changed by further +linking. +</p> +</dd> +<dt><code>B</code></dt> +<dt><code>b</code></dt> +<dd><p>The symbol is in the BSS data section. This section typically +contains zero-initialized or uninitialized data, although the exact +behavior is system dependent. +</p> +</dd> +<dt><code>C</code></dt> +<dt><code>c</code></dt> +<dd><p>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 +references. +For more details on common symbols, see the discussion of +–warn-common in <a href="http://sourceware.org/binutils/docs/ld/Options.html#Options">Linker options</a> in <cite>The GNU linker</cite>. +The lower case <var>c</var> character is used when the symbol is in a +special section for small commons. +</p> +</dd> +<dt><code>D</code></dt> +<dt><code>d</code></dt> +<dd><p>The symbol is in the initialized data section. +</p> +</dd> +<dt><code>G</code></dt> +<dt><code>g</code></dt> +<dd><p>The symbol is in an initialized data section for small objects. Some +object file formats permit more efficient access to small data objects, +such as a global int variable as opposed to a large global array. +</p> +</dd> +<dt><code>i</code></dt> +<dd><p>For PE format files this indicates that the symbol is in a section +specific to the implementation of DLLs. +</p> +<p>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. +</p> +<p>Note - the actual symbols display for GNU indirect symbols is +controlled by the <samp>--ifunc-chars</samp> 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. +</p> +</dd> +<dt><code>I</code></dt> +<dd><p>The symbol is an indirect reference to another symbol. +</p> +</dd> +<dt><code>N</code></dt> +<dd><p>The symbol is a debugging symbol. +</p> +</dd> +<dt><code>n</code></dt> +<dd><p>The symbol is in a non-data, non-code, non-debug read-only section. +</p> +</dd> +<dt><code>p</code></dt> +<dd><p>The symbol is in a stack unwind section. +</p> +</dd> +<dt><code>R</code></dt> +<dt><code>r</code></dt> +<dd><p>The symbol is in a read only data section. +</p> +</dd> +<dt><code>S</code></dt> +<dt><code>s</code></dt> +<dd><p>The symbol is in an uninitialized or zero-initialized data section +for small objects. +</p> +</dd> +<dt><code>T</code></dt> +<dt><code>t</code></dt> +<dd><p>The symbol is in the text (code) section. +</p> +</dd> +<dt><code>U</code></dt> +<dd><p>The symbol is undefined. +</p> +</dd> +<dt><code>u</code></dt> +<dd><p>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. +</p> +</dd> +<dt><code>V</code></dt> +<dt><code>v</code></dt> +<dd><p>The symbol is a weak object. When a weak defined symbol is linked with +a normal defined symbol, the normal defined symbol is used with no error. +When a weak undefined symbol is linked and the symbol is not defined, +the value of the weak symbol becomes zero with no error. On some +systems, uppercase indicates that a default value has been specified. +</p> +</dd> +<dt><code>W</code></dt> +<dt><code>w</code></dt> +<dd><p>The symbol is a weak symbol that has not been specifically tagged as a +weak object symbol. When a weak defined symbol is linked with a normal +defined symbol, the normal defined symbol is used with no error. +When a weak undefined symbol is linked and the symbol is not defined, +the value of the symbol is determined in a system-specific manner without +error. On some systems, uppercase indicates that a default value has been +specified. +</p> +</dd> +<dt><code>-</code></dt> +<dd><p>The symbol is a stabs symbol in an a.out object file. In this case, the +next values printed are the stabs other field, the stabs desc field, and +the stab type. Stabs symbols are used to hold debugging information. +</p> +</dd> +<dt><code>?</code></dt> +<dd><p>The symbol type is unknown, or object file format specific. +</p></dd> +</dl> + +</li><li> 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</samp>’. 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</samp>’. +</li></ul> + + +<p>The long and short forms of options, shown here as alternatives, are +equivalent. +</p> +<dl compact="compact"> +<dt><code>-A</code></dt> +<dt><code>-o</code></dt> +<dt><code>--print-file-name</code></dt> +<dd><a name="index-input-file-name"></a> +<a name="index-file-name"></a> +<a name="index-source-file-name"></a> +<p>Precede each symbol by the name of the input file (or archive member) +in which it was found, rather than identifying the input file once only, +before all of its symbols. +</p> +</dd> +<dt><code>-a</code></dt> +<dt><code>--debug-syms</code></dt> +<dd><a name="index-debugging-symbols"></a> +<p>Display all symbols, even debugger-only symbols; normally these are not +listed. +</p> +</dd> +<dt><code>-B</code></dt> +<dd><a name="index-nm-format"></a> +<a name="index-nm-compatibility"></a> +<p>The same as <samp>--format=bsd</samp> (for compatibility with the MIPS <code>nm</code>). +</p> +</dd> +<dt><code>-C</code></dt> +<dt><code>--demangle[=<var>style</var>]</code></dt> +<dd><a name="index-demangling-in-nm"></a> +<p>Decode (<em>demangle</em>) low-level symbol names into user-level names. +Besides removing any initial underscore prepended by the system, this +makes C++ function names readable. Different compilers have different +mangling styles. The optional demangling style argument can be used to +choose an appropriate demangling style for your compiler. See <a href="#c_002b_002bfilt">c++filt</a>, +for more information on demangling. +</p> +</dd> +<dt><code>--no-demangle</code></dt> +<dd><p>Do not demangle low-level symbol names. This is the default. +</p> +</dd> +<dt><code>--recurse-limit</code></dt> +<dt><code>--no-recurse-limit</code></dt> +<dt><code>--recursion-limit</code></dt> +<dt><code>--no-recursion-limit</code></dt> +<dd><p>Enables or disables a limit on the amount of recursion performed +whilst demangling strings. Since the name mangling formats allow for +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. +</p> +<p>The default is for this limit to be enabled, but disabling it may be +necessary in order to demangle truly complicated names. Note however +that if the recursion limit is disabled then stack exhaustion is +possible and any bug reports about such an event will be rejected. +</p> +</dd> +<dt><code>-D</code></dt> +<dt><code>--dynamic</code></dt> +<dd><a name="index-dynamic-symbols"></a> +<p>Display the dynamic symbols rather than the normal symbols. This is +only meaningful for dynamic objects, such as certain types of shared +libraries. +</p> +</dd> +<dt><code>-f <var>format</var></code></dt> +<dt><code>--format=<var>format</var></code></dt> +<dd><a name="index-nm-format-1"></a> +<a name="index-nm-compatibility-1"></a> +<p>Use the output format <var>format</var>, which can be <code>bsd</code>, +<code>sysv</code>, <code>posix</code> or <code>just-symbols</code>. The default is <code>bsd</code>. +Only the first character of <var>format</var> is significant; it can be +either upper or lower case. +</p> +</dd> +<dt><code>-g</code></dt> +<dt><code>--extern-only</code></dt> +<dd><a name="index-external-symbols"></a> +<p>Display only external symbols. +</p> +</dd> +<dt><code>-h</code></dt> +<dt><code>--help</code></dt> +<dd><p>Show a summary of the options to <code>nm</code> and exit. +</p> +</dd> +<dt><code>--ifunc-chars=<var>CHARS</var></code></dt> +<dd><p>When display GNU indirect function symbols <code>nm</code> will default +to using the <code>i</code> character for both local indirect functions and +global indirect functions. The <samp>--ifunc-chars</samp> 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. +</p> +</dd> +<dt><code>j</code></dt> +<dd><p>The same as <samp>--format=just-symbols</samp>. +</p> +</dd> +<dt><code>-l</code></dt> +<dt><code>--line-numbers</code></dt> +<dd><a name="index-symbol-line-numbers"></a> +<p>For each symbol, use debugging information to try to find a filename and +line number. For a defined symbol, look for the line number of the +address of the symbol. For an undefined symbol, look for the line +number of a relocation entry which refers to the symbol. If line number +information can be found, print it after the other symbol information. +</p> +</dd> +<dt><code>--inlines</code></dt> +<dd><a name="index-objdump-inlines"></a> +<p>When option <samp>-l</samp> is active, if the address belongs to a +function that was inlined, then this option causes the source +information for all enclosing scopes back to the first non-inlined +function to be printed as well. For example, if <code>main</code> inlines +<code>callee1</code> which inlines <code>callee2</code>, and address is from +<code>callee2</code>, the source information for <code>callee1</code> and <code>main</code> +will also be printed. +</p> +</dd> +<dt><code>-n</code></dt> +<dt><code>-v</code></dt> +<dt><code>--numeric-sort</code></dt> +<dd><p>Sort symbols numerically by their addresses, rather than alphabetically +by their names. +</p> +</dd> +<dt><code>-p</code></dt> +<dt><code>--no-sort</code></dt> +<dd><a name="index-sorting-symbols"></a> +<p>Do not bother to sort the symbols in any order; print them in the order +encountered. +</p> +</dd> +<dt><code>-P</code></dt> +<dt><code>--portability</code></dt> +<dd><p>Use the POSIX.2 standard output format instead of the default format. +Equivalent to ‘<samp>-f posix</samp>’. +</p> +</dd> +<dt><code>-r</code></dt> +<dt><code>--reverse-sort</code></dt> +<dd><p>Reverse the order of the sort (whether numeric or alphabetic); let the +last come first. +</p> +</dd> +<dt><code>-S</code></dt> +<dt><code>--print-size</code></dt> +<dd><p>Print both value and size of defined symbols for the <code>bsd</code> output style. +This option has no effect for object formats that do not record symbol +sizes, unless ‘<samp>--size-sort</samp>’ is also used in which case a +calculated size is displayed. +</p> +</dd> +<dt><code>-s</code></dt> +<dt><code>--print-armap</code></dt> +<dd><a name="index-symbol-index_002c-listing"></a> +<p>When listing symbols from archive members, include the index: a mapping +(stored in the archive by <code>ar</code> or <code>ranlib</code>) of which modules +contain definitions for which names. +</p> +</dd> +<dt><code>-t <var>radix</var></code></dt> +<dt><code>--radix=<var>radix</var></code></dt> +<dd><p>Use <var>radix</var> as the radix for printing the symbol values. It must be +‘<samp>d</samp>’ for decimal, ‘<samp>o</samp>’ for octal, or ‘<samp>x</samp>’ for hexadecimal. +</p> +</dd> +<dt><code>-u</code></dt> +<dt><code>--undefined-only</code></dt> +<dd><a name="index-external-symbols-1"></a> +<a name="index-undefined-symbols"></a> +<p>Display only undefined symbols (those external to each object file). +By default both defined and undefined symbols are displayed. +</p> +</dd> +<dt><code>-U</code></dt> +<dt><code>--defined-only</code></dt> +<dd><a name="index-external-symbols-2"></a> +<a name="index-undefined-symbols-1"></a> +<p>Display only defined symbols for each object file. +By default both defined and undefined symbols are displayed. +</p> +</dd> +<dt><code>-V</code></dt> +<dt><code>--version</code></dt> +<dd><p>Show the version number of <code>nm</code> and exit. +</p> +</dd> +<dt><code>-X</code></dt> +<dd><p>This option is ignored for compatibility with the AIX version of +<code>nm</code>. It takes one parameter which must be the string +<samp>32_64</samp>. The default mode of AIX <code>nm</code> corresponds +to <samp>-X 32</samp>, which is not supported by <small>GNU</small> <code>nm</code>. +</p> +</dd> +<dt><code>--plugin <var>name</var></code></dt> +<dd><a name="index-plugins-1"></a> +<p>Load the plugin called <var>name</var> to add support for extra target +types. This option is only available if the toolchain has been built +with plugin support enabled. +</p> +<p>If <samp>--plugin</samp> is not provided, but plugin support has been +enabled then <code>nm</code> iterates over the files in +<samp>${libdir}/bfd-plugins</samp> in alphabetic order and the first +plugin that claims the object in question is used. +</p> +<p>Please note that this plugin search directory is <em>not</em> the one +used by <code>ld</code>’s <samp>-plugin</samp> option. In order to make +<code>nm</code> use the linker plugin it must be copied into the +<samp>${libdir}/bfd-plugins</samp> directory. For GCC based compilations +the linker plugin is called <samp>liblto_plugin.so.0.0.0</samp>. For Clang +based compilations it is called <samp>LLVMgold.so</samp>. The GCC plugin +is always backwards compatible with earlier versions, so it is +sufficient to just copy the newest one. +</p> +</dd> +<dt><code>--size-sort</code></dt> +<dd><p>Sort symbols by size. For ELF objects symbol sizes are read from the +ELF, for other object types the symbol sizes are computed as the +difference between the value of the symbol and the value of the symbol +with the next higher value. If the <code>bsd</code> output format is used +the size of the symbol is printed, rather than the value, and +‘<samp>-S</samp>’ must be used in order both size and value to be printed. +</p> +<p>Note - this option does not work if <samp>--undefined-only</samp> has been +enabled as undefined symbols have no size. +</p> +</dd> +<dt><code>--special-syms</code></dt> +<dd><p>Display symbols which have a target-specific special meaning. These +symbols are usually used by the target for some special processing and +are not normally helpful when included in the normal symbol lists. +For example for ARM targets this option would skip the mapping symbols +used to mark transitions between ARM code, THUMB code and data. +</p> +</dd> +<dt><code>--synthetic</code></dt> +<dd><p>Include synthetic symbols in the output. These are special symbols +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. +</p> +</dd> +<dt><code>--unicode=<var>[default|invalid|locale|escape|hex|highlight]</var></code></dt> +<dd><p>Controls the display of UTF-8 encoded multibyte characters in strings. +The default (<samp>--unicode=default</samp>) is to give them no special +treatment. The <samp>--unicode=locale</samp> option displays the sequence +in the current locale, which may or may not support them. The options +<samp>--unicode=hex</samp> and <samp>--unicode=invalid</samp> display them as +hex byte sequences enclosed by either angle brackets or curly braces. +</p> +<p>The <samp>--unicode=escape</samp> option displays them as escape sequences +(<var>\uxxxx</var>) and the <samp>--unicode=highlight</samp> 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. +</p> +</dd> +<dt><code>-W</code></dt> +<dt><code>--no-weak</code></dt> +<dd><p>Do not display weak symbols. +</p> +</dd> +<dt><code>--with-symbol-versions</code></dt> +<dt><code>--without-symbol-versions</code></dt> +<dd><p>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</samp>’. 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</samp>’. By default, symbol +version information is displayed. +</p> +</dd> +<dt><code>--target=<var>bfdname</var></code></dt> +<dd><a name="index-object-code-format"></a> +<p>Specify an object code format other than your system’s default format. +See <a href="#Target-Selection">Target Selection</a>, for more information. +</p> +</dd> +</dl> + + + +<hr> +<a name="objcopy"></a> +<div class="header"> +<p> +Next: <a href="#objdump" accesskey="n" rel="next">objdump</a>, Previous: <a href="#nm" accesskey="p" rel="previous">nm</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="objcopy-1"></a> +<h2 class="chapter">3 objcopy</h2> + + +<div class="smallexample"> +<pre class="smallexample">objcopy [<samp>-F</samp> <var>bfdname</var>|<samp>--target=</samp><var>bfdname</var>] + [<samp>-I</samp> <var>bfdname</var>|<samp>--input-target=</samp><var>bfdname</var>] + [<samp>-O</samp> <var>bfdname</var>|<samp>--output-target=</samp><var>bfdname</var>] + [<samp>-B</samp> <var>bfdarch</var>|<samp>--binary-architecture=</samp><var>bfdarch</var>] + [<samp>-S</samp>|<samp>--strip-all</samp>] + [<samp>-g</samp>|<samp>--strip-debug</samp>] + [<samp>--strip-unneeded</samp>] + [<samp>-K</samp> <var>symbolname</var>|<samp>--keep-symbol=</samp><var>symbolname</var>] + [<samp>--keep-file-symbols</samp>] + [<samp>--keep-section-symbols</samp>] + [<samp>-N</samp> <var>symbolname</var>|<samp>--strip-symbol=</samp><var>symbolname</var>] + [<samp>--strip-unneeded-symbol=</samp><var>symbolname</var>] + [<samp>-G</samp> <var>symbolname</var>|<samp>--keep-global-symbol=</samp><var>symbolname</var>] + [<samp>--localize-hidden</samp>] + [<samp>-L</samp> <var>symbolname</var>|<samp>--localize-symbol=</samp><var>symbolname</var>] + [<samp>--globalize-symbol=</samp><var>symbolname</var>] + [<samp>--globalize-symbols=</samp><var>filename</var>] + [<samp>-W</samp> <var>symbolname</var>|<samp>--weaken-symbol=</samp><var>symbolname</var>] + [<samp>-w</samp>|<samp>--wildcard</samp>] + [<samp>-x</samp>|<samp>--discard-all</samp>] + [<samp>-X</samp>|<samp>--discard-locals</samp>] + [<samp>-b</samp> <var>byte</var>|<samp>--byte=</samp><var>byte</var>] + [<samp>-i</samp> [<var>breadth</var>]|<samp>--interleave</samp>[=<var>breadth</var>]] + [<samp>--interleave-width=</samp><var>width</var>] + [<samp>-j</samp> <var>sectionpattern</var>|<samp>--only-section=</samp><var>sectionpattern</var>] + [<samp>-R</samp> <var>sectionpattern</var>|<samp>--remove-section=</samp><var>sectionpattern</var>] + [<samp>--keep-section=</samp><var>sectionpattern</var>] + [<samp>--remove-relocations=</samp><var>sectionpattern</var>] + [<samp>--strip-section-headers</samp>] + [<samp>-p</samp>|<samp>--preserve-dates</samp>] + [<samp>-D</samp>|<samp>--enable-deterministic-archives</samp>] + [<samp>-U</samp>|<samp>--disable-deterministic-archives</samp>] + [<samp>--debugging</samp>] + [<samp>--gap-fill=</samp><var>val</var>] + [<samp>--pad-to=</samp><var>address</var>] + [<samp>--set-start=</samp><var>val</var>] + [<samp>--adjust-start=</samp><var>incr</var>] + [<samp>--change-addresses=</samp><var>incr</var>] + [<samp>--change-section-address</samp> <var>sectionpattern</var>{=,+,-}<var>val</var>] + [<samp>--change-section-lma</samp> <var>sectionpattern</var>{=,+,-}<var>val</var>] + [<samp>--change-section-vma</samp> <var>sectionpattern</var>{=,+,-}<var>val</var>] + [<samp>--change-warnings</samp>] [<samp>--no-change-warnings</samp>] + [<samp>--set-section-flags</samp> <var>sectionpattern</var>=<var>flags</var>] + [<samp>--set-section-alignment</samp> <var>sectionpattern</var>=<var>align</var>] + [<samp>--add-section</samp> <var>sectionname</var>=<var>filename</var>] + [<samp>--dump-section</samp> <var>sectionname</var>=<var>filename</var>] + [<samp>--update-section</samp> <var>sectionname</var>=<var>filename</var>] + [<samp>--rename-section</samp> <var>oldname</var>=<var>newname</var>[,<var>flags</var>]] + [<samp>--long-section-names</samp> {enable,disable,keep}] + [<samp>--change-leading-char</samp>] [<samp>--remove-leading-char</samp>] + [<samp>--reverse-bytes=</samp><var>num</var>] + [<samp>--srec-len=</samp><var>ival</var>] [<samp>--srec-forceS3</samp>] + [<samp>--redefine-sym</samp> <var>old</var>=<var>new</var>] + [<samp>--redefine-syms=</samp><var>filename</var>] + [<samp>--weaken</samp>] + [<samp>--keep-symbols=</samp><var>filename</var>] + [<samp>--strip-symbols=</samp><var>filename</var>] + [<samp>--strip-unneeded-symbols=</samp><var>filename</var>] + [<samp>--keep-global-symbols=</samp><var>filename</var>] + [<samp>--localize-symbols=</samp><var>filename</var>] + [<samp>--weaken-symbols=</samp><var>filename</var>] + [<samp>--add-symbol</samp> <var>name</var>=[<var>section</var>:]<var>value</var>[,<var>flags</var>]] + [<samp>--alt-machine-code=</samp><var>index</var>] + [<samp>--prefix-symbols=</samp><var>string</var>] + [<samp>--prefix-sections=</samp><var>string</var>] + [<samp>--prefix-alloc-sections=</samp><var>string</var>] + [<samp>--add-gnu-debuglink=</samp><var>path-to-file</var>] + [<samp>--only-keep-debug</samp>] + [<samp>--strip-dwo</samp>] + [<samp>--extract-dwo</samp>] + [<samp>--extract-symbol</samp>] + [<samp>--writable-text</samp>] + [<samp>--readonly-text</samp>] + [<samp>--pure</samp>] + [<samp>--impure</samp>] + [<samp>--file-alignment=</samp><var>num</var>] + [<samp>--heap=</samp><var>size</var>] + [<samp>--image-base=</samp><var>address</var>] + [<samp>--section-alignment=</samp><var>num</var>] + [<samp>--stack=</samp><var>size</var>] + [<samp>--subsystem=</samp><var>which</var>:<var>major</var>.<var>minor</var>] + [<samp>--compress-debug-sections</samp>] + [<samp>--decompress-debug-sections</samp>] + [<samp>--elf-stt-common=<var>val</var></samp>] + [<samp>--merge-notes</samp>] + [<samp>--no-merge-notes</samp>] + [<samp>--verilog-data-width=<var>val</var></samp>] + [<samp>-v</samp>|<samp>--verbose</samp>] + [<samp>-V</samp>|<samp>--version</samp>] + [<samp>--help</samp>] [<samp>--info</samp>] + <var>infile</var> [<var>outfile</var>] +</pre></div> + +<p>The <small>GNU</small> <code>objcopy</code> utility copies the contents of an object +file to another. <code>objcopy</code> uses the <small>GNU</small> <small>BFD</small> Library to +read and write the object files. It can write the destination object +file in a format different from that of the source object file. The +exact behavior of <code>objcopy</code> is controlled by command-line options. +Note that <code>objcopy</code> should be able to copy a fully linked file +between any two formats. However, copying a relocatable object file +between any two formats may not work as expected. +</p> +<p><code>objcopy</code> creates temporary files to do its translations and +deletes them afterward. <code>objcopy</code> uses <small>BFD</small> to do all its +translation work; it has access to all the formats described in <small>BFD</small> +and thus is able to recognize most formats without being told +explicitly. See <a href="http://sourceware.org/binutils/docs/ld/BFD.html#BFD">BFD</a> in <cite>Using LD</cite>. +</p> +<p><code>objcopy</code> can be used to generate S-records by using an output +target of ‘<samp>srec</samp>’ (e.g., use ‘<samp>-O srec</samp>’). +</p> +<p><code>objcopy</code> can be used to generate a raw binary file by using an +output target of ‘<samp>binary</samp>’ (e.g., use <samp>-O binary</samp>). When +<code>objcopy</code> generates a raw binary file, it will essentially produce +a memory dump of the contents of the input object file. All symbols and +relocation information will be discarded. The memory dump will start at +the load address of the lowest section copied into the output file. +</p> +<p>When generating an S-record or a raw binary file, it may be helpful to +use <samp>-S</samp> to remove sections containing debugging information. In +some cases <samp>-R</samp> will be useful to remove sections which contain +information that is not needed by the binary file. +</p> +<p>Note—<code>objcopy</code> is not able to change the endianness of its input +files. If the input format has an endianness (some formats do not), +<code>objcopy</code> can only copy the inputs into file formats that have the +same endianness or which have no endianness (e.g., ‘<samp>srec</samp>’). +(However, see the <samp>--reverse-bytes</samp> option.) +</p> + + +<dl compact="compact"> +<dt><code><var>infile</var></code></dt> +<dt><code><var>outfile</var></code></dt> +<dd><p>The input and output files, respectively. +If you do not specify <var>outfile</var>, <code>objcopy</code> creates a +temporary file and destructively renames the result with +the name of <var>infile</var>. +</p> +</dd> +<dt><code>-I <var>bfdname</var></code></dt> +<dt><code>--input-target=<var>bfdname</var></code></dt> +<dd><p>Consider the source file’s object format to be <var>bfdname</var>, rather than +attempting to deduce it. See <a href="#Target-Selection">Target Selection</a>, for more information. +</p> +</dd> +<dt><code>-O <var>bfdname</var></code></dt> +<dt><code>--output-target=<var>bfdname</var></code></dt> +<dd><p>Write the output file using the object format <var>bfdname</var>. +See <a href="#Target-Selection">Target Selection</a>, for more information. +</p> +</dd> +<dt><code>-F <var>bfdname</var></code></dt> +<dt><code>--target=<var>bfdname</var></code></dt> +<dd><p>Use <var>bfdname</var> as the object format for both the input and the output +file; i.e., simply transfer data from source to destination with no +translation. See <a href="#Target-Selection">Target Selection</a>, for more information. +</p> +</dd> +<dt><code>-B <var>bfdarch</var></code></dt> +<dt><code>--binary-architecture=<var>bfdarch</var></code></dt> +<dd><p>Useful when transforming a architecture-less input file into an object file. +In this case the output architecture can be set to <var>bfdarch</var>. This +option will be ignored if the input file has a known <var>bfdarch</var>. 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</var>_start, _binary_<var>objfile</var>_end and +_binary_<var>objfile</var>_size. e.g. you can transform a picture file into +an object file and then access it in your code using these symbols. +</p> +</dd> +<dt><code>-j <var>sectionpattern</var></code></dt> +<dt><code>--only-section=<var>sectionpattern</var></code></dt> +<dd><p>Copy only the indicated sections from the input file to the output file. +This option may be given more than once. Note that using this option +inappropriately may make the output file unusable. Wildcard +characters are accepted in <var>sectionpattern</var>. +</p> +<p>If the first character of <var>sectionpattern</var> is the exclamation +point (!) then matching sections will not be copied, even if earlier +use of <samp>--only-section</samp> on the same command line would +otherwise copy it. For example: +</p> +<div class="smallexample"> +<pre class="smallexample"> --only-section=.text.* --only-section=!.text.foo +</pre></div> + +<p>will copy all sectinos matching ’.text.*’ but not the section +’.text.foo’. +</p> +</dd> +<dt><code>-R <var>sectionpattern</var></code></dt> +<dt><code>--remove-section=<var>sectionpattern</var></code></dt> +<dd><p>Remove any section matching <var>sectionpattern</var> from the output file. +This option may be given more than once. Note that using this option +inappropriately may make the output file unusable. Wildcard +characters are accepted in <var>sectionpattern</var>. Using both the +<samp>-j</samp> and <samp>-R</samp> options together results in undefined +behaviour. +</p> +<p>If the first character of <var>sectionpattern</var> is the exclamation +point (!) then matching sections will not be removed even if an +earlier use of <samp>--remove-section</samp> on the same command line +would otherwise remove it. For example: +</p> +<div class="smallexample"> +<pre class="smallexample"> --remove-section=.text.* --remove-section=!.text.foo +</pre></div> + +<p>will remove all sections matching the pattern ’.text.*’, but will not +remove the section ’.text.foo’. +</p> +</dd> +<dt><code>--keep-section=<var>sectionpattern</var></code></dt> +<dd><p>When removing sections from the output file, keep sections that match +<var>sectionpattern</var>. +</p> +</dd> +<dt><code>--remove-relocations=<var>sectionpattern</var></code></dt> +<dd><p>Remove non-dynamic relocations from the output file for any section +matching <var>sectionpattern</var>. This option may be given more than +once. Note that using this option inappropriately may make the output +file unusable, and attempting to remove a dynamic relocation section +such as ‘<samp>.rela.plt</samp>’ from an executable or shared library with +<samp>--remove-relocations=.plt</samp> will not work. Wildcard characters +are accepted in <var>sectionpattern</var>. +For example: +</p> +<div class="smallexample"> +<pre class="smallexample"> --remove-relocations=.text.* +</pre></div> + +<p>will remove the relocations for all sections matching the pattern +’.text.*’. +</p> +<p>If the first character of <var>sectionpattern</var> is the exclamation +point (!) then matching sections will not have their relocation +removed even if an earlier use of <samp>--remove-relocations</samp> on the +same command line would otherwise cause the relocations to be removed. +For example: +</p> +<div class="smallexample"> +<pre class="smallexample"> --remove-relocations=.text.* --remove-relocations=!.text.foo +</pre></div> + +<p>will remove all relocations for sections matching the pattern +’.text.*’, but will not remove relocations for the section +’.text.foo’. +</p> +</dd> +<dt><code>--strip-section-headers</code></dt> +<dd><p>Strip section header This option is specific to ELF files. +Implies <samp>--strip-all</samp> and <samp>--merge-notes</samp>. +</p> +</dd> +<dt><code>-S</code></dt> +<dt><code>--strip-all</code></dt> +<dd><p>Do not copy relocation and symbol information from the source file. +Also deletes debug sections. +</p> +</dd> +<dt><code>-g</code></dt> +<dt><code>--strip-debug</code></dt> +<dd><p>Do not copy debugging symbols or sections from the source file. +</p> +</dd> +<dt><code>--strip-unneeded</code></dt> +<dd><p>Remove all symbols that are not needed for relocation processing in +addition to debugging symbols and sections stripped by +<samp>--strip-debug</samp>. +</p> +</dd> +<dt><code>-K <var>symbolname</var></code></dt> +<dt><code>--keep-symbol=<var>symbolname</var></code></dt> +<dd><p>When stripping symbols, keep symbol <var>symbolname</var> even if it would +normally be stripped. This option may be given more than once. +</p> +</dd> +<dt><code>-N <var>symbolname</var></code></dt> +<dt><code>--strip-symbol=<var>symbolname</var></code></dt> +<dd><p>Do not copy symbol <var>symbolname</var> from the source file. This option +may be given more than once. +</p> +</dd> +<dt><code>--strip-unneeded-symbol=<var>symbolname</var></code></dt> +<dd><p>Do not copy symbol <var>symbolname</var> from the source file unless it is needed +by a relocation. This option may be given more than once. +</p> +</dd> +<dt><code>-G <var>symbolname</var></code></dt> +<dt><code>--keep-global-symbol=<var>symbolname</var></code></dt> +<dd><p>Keep only symbol <var>symbolname</var> global. Make all other symbols local +to the file, so that they are not visible externally. This option may +be given more than once. Note: this option cannot be used in +conjunction with the <samp>--globalize-symbol</samp> or +<samp>--globalize-symbols</samp> options. +</p> +</dd> +<dt><code>--localize-hidden</code></dt> +<dd><p>In an ELF object, mark all symbols that have hidden or internal visibility +as local. This option applies on top of symbol-specific localization options +such as <samp>-L</samp>. +</p> +</dd> +<dt><code>-L <var>symbolname</var></code></dt> +<dt><code>--localize-symbol=<var>symbolname</var></code></dt> +<dd><p>Convert a global or weak symbol called <var>symbolname</var> into a local +symbol, so that it is not visible externally. This option may be +given more than once. Note - unique symbols are not converted. +</p> +</dd> +<dt><code>-W <var>symbolname</var></code></dt> +<dt><code>--weaken-symbol=<var>symbolname</var></code></dt> +<dd><p>Make symbol <var>symbolname</var> weak. This option may be given more than once. +</p> +</dd> +<dt><code>--globalize-symbol=<var>symbolname</var></code></dt> +<dd><p>Give symbol <var>symbolname</var> global scoping so that it is visible +outside of the file in which it is defined. This option may be given +more than once. Note: this option cannot be used in conjunction with +the <samp>-G</samp> or <samp>--keep-global-symbol</samp> options. +</p> +</dd> +<dt><code>-w</code></dt> +<dt><code>--wildcard</code></dt> +<dd><p>Permit regular expressions in <var>symbolname</var>s used in other command +line options. The question mark (?), asterisk (*), backslash (\) and +square brackets ([]) operators can be used anywhere in the symbol +name. If the first character of the symbol name is the exclamation +point (!) then the sense of the switch is reversed for that symbol. +For example: +</p> +<div class="smallexample"> +<pre class="smallexample"> -w -W !foo -W fo* +</pre></div> + +<p>would cause objcopy to weaken all symbols that start with “fo” +except for the symbol “foo”. +</p> +</dd> +<dt><code>-x</code></dt> +<dt><code>--discard-all</code></dt> +<dd><p>Do not copy non-global symbols from the source file. +</p> +</dd> +<dt><code>-X</code></dt> +<dt><code>--discard-locals</code></dt> +<dd><p>Do not copy compiler-generated local symbols. +(These usually start with ‘<samp>L</samp>’ or ‘<samp>.</samp>’.) +</p> +</dd> +<dt><code>-b <var>byte</var></code></dt> +<dt><code>--byte=<var>byte</var></code></dt> +<dd><p>If interleaving has been enabled via the <samp>--interleave</samp> option +then start the range of bytes to keep at the <var>byte</var>th byte. +<var>byte</var> can be in the range from 0 to <var>breadth</var>-1, where +<var>breadth</var> is the value given by the <samp>--interleave</samp> option. +</p> +</dd> +<dt><code>-i [<var>breadth</var>]</code></dt> +<dt><code>--interleave[=<var>breadth</var>]</code></dt> +<dd><p>Only copy a range out of every <var>breadth</var> bytes. (Header data is +not affected). Select which byte in the range begins the copy with +the <samp>--byte</samp> option. Select the width of the range with the +<samp>--interleave-width</samp> option. +</p> +<p>This option is useful for creating files to program <small>ROM</small>. It is +typically used with an <code>srec</code> output target. Note that +<code>objcopy</code> will complain if you do not specify the +<samp>--byte</samp> option as well. +</p> +<p>The default interleave breadth is 4, so with <samp>--byte</samp> set to 0, +<code>objcopy</code> would copy the first byte out of every four bytes +from the input to the output. +</p> +</dd> +<dt><code>--interleave-width=<var>width</var></code></dt> +<dd><p>When used with the <samp>--interleave</samp> option, copy <var>width</var> +bytes at a time. The start of the range of bytes to be copied is set +by the <samp>--byte</samp> option, and the extent of the range is set with +the <samp>--interleave</samp> option. +</p> +<p>The default value for this option is 1. The value of <var>width</var> plus +the <var>byte</var> value set by the <samp>--byte</samp> option must not exceed +the interleave breadth set by the <samp>--interleave</samp> option. +</p> +<p>This option can be used to create images for two 16-bit flashes interleaved +in a 32-bit bus by passing <samp>-b 0 -i 4 --interleave-width=2</samp> +and <samp>-b 2 -i 4 --interleave-width=2</samp> to two <code>objcopy</code> +commands. If the input was ’12345678’ then the outputs would be +’1256’ and ’3478’ respectively. +</p> +</dd> +<dt><code>-p</code></dt> +<dt><code>--preserve-dates</code></dt> +<dd><p>Set the access and modification dates of the output file to be the same +as those of the input file. +</p> +</dd> +<dt><code>-D</code></dt> +<dt><code>--enable-deterministic-archives</code></dt> +<dd><a name="index-deterministic-archives-2"></a> +<a name="index-_002d_002denable_002ddeterministic_002darchives-2"></a> +<p>Operate in <em>deterministic</em> mode. When copying archive members +and writing the archive index, use zero for UIDs, GIDs, timestamps, +and use consistent file modes for all files. +</p> +<p>If <samp>binutils</samp> was configured with +<samp>--enable-deterministic-archives</samp>, then this mode is on by default. +It can be disabled with the ‘<samp>-U</samp>’ option, below. +</p> +</dd> +<dt><code>-U</code></dt> +<dt><code>--disable-deterministic-archives</code></dt> +<dd><a name="index-deterministic-archives-3"></a> +<a name="index-_002d_002denable_002ddeterministic_002darchives-3"></a> +<p>Do <em>not</em> operate in <em>deterministic</em> mode. This is the +inverse of the <samp>-D</samp> option, above: when copying archive members +and writing the archive index, use their actual UID, GID, timestamp, +and file mode values. +</p> +<p>This is the default unless <samp>binutils</samp> was configured with +<samp>--enable-deterministic-archives</samp>. +</p> +</dd> +<dt><code>--debugging</code></dt> +<dd><p>Convert debugging information, if possible. This is not the default +because only certain debugging formats are supported, and the +conversion process can be time consuming. +</p> +</dd> +<dt><code>--gap-fill <var>val</var></code></dt> +<dd><p>Fill gaps between sections with <var>val</var>. This operation applies to +the <em>load address</em> (LMA) of the sections. It is done by increasing +the size of the section with the lower address, and filling in the extra +space created with <var>val</var>. +</p> +</dd> +<dt><code>--pad-to <var>address</var></code></dt> +<dd><p>Pad the output file up to the load address <var>address</var>. This is +done by increasing the size of the last section. The extra space is +filled in with the value specified by <samp>--gap-fill</samp> (default zero). +</p> +</dd> +<dt><code>--set-start <var>val</var></code></dt> +<dd><p>Set the start address (also known as the entry address) of the new +file to <var>val</var>. Not all object file formats support setting the +start address. +</p> +</dd> +<dt><code>--change-start <var>incr</var></code></dt> +<dt><code>--adjust-start <var>incr</var></code></dt> +<dd><a name="index-changing-start-address"></a> +<p>Change the start address (also known as the entry address) by adding +<var>incr</var>. Not all object file formats support setting the start +address. +</p> +</dd> +<dt><code>--change-addresses <var>incr</var></code></dt> +<dt><code>--adjust-vma <var>incr</var></code></dt> +<dd><a name="index-changing-object-addresses"></a> +<p>Change the VMA and LMA addresses of all sections, as well as the start +address, by adding <var>incr</var>. Some object file formats do not permit +section addresses to be changed arbitrarily. Note that this does not +relocate the sections; if the program expects sections to be loaded at a +certain address, and this option is used to change the sections such +that they are loaded at a different address, the program may fail. +</p> +</dd> +<dt><code>--change-section-address <var>sectionpattern</var>{=,+,-}<var>val</var></code></dt> +<dt><code>--adjust-section-vma <var>sectionpattern</var>{=,+,-}<var>val</var></code></dt> +<dd><a name="index-changing-section-address"></a> +<p>Set or change both the VMA address and the LMA address of any section +matching <var>sectionpattern</var>. If ‘<samp>=</samp>’ is used, the section +address is set to <var>val</var>. Otherwise, <var>val</var> is added to or +subtracted from the section address. See the comments under +<samp>--change-addresses</samp>, above. If <var>sectionpattern</var> does not +match any sections in the input file, a warning will be issued, unless +<samp>--no-change-warnings</samp> is used. +</p> +</dd> +<dt><code>--change-section-lma <var>sectionpattern</var>{=,+,-}<var>val</var></code></dt> +<dd><a name="index-changing-section-LMA"></a> +<p>Set or change the LMA address of any sections matching +<var>sectionpattern</var>. The LMA address is the address where the +section will be loaded into memory at program load time. Normally +this is the same as the VMA address, which is the address of the +section at program run time, but on some systems, especially those +where a program is held in ROM, the two can be different. If ‘<samp>=</samp>’ +is used, the section address is set to <var>val</var>. Otherwise, +<var>val</var> is added to or subtracted from the section address. See the +comments under <samp>--change-addresses</samp>, above. If +<var>sectionpattern</var> does not match any sections in the input file, a +warning will be issued, unless <samp>--no-change-warnings</samp> is used. +</p> +</dd> +<dt><code>--change-section-vma <var>sectionpattern</var>{=,+,-}<var>val</var></code></dt> +<dd><a name="index-changing-section-VMA"></a> +<p>Set or change the VMA address of any section matching +<var>sectionpattern</var>. The VMA address is the address where the +section will be located once the program has started executing. +Normally this is the same as the LMA address, which is the address +where the section will be loaded into memory, but on some systems, +especially those where a program is held in ROM, the two can be +different. If ‘<samp>=</samp>’ is used, the section address is set to +<var>val</var>. Otherwise, <var>val</var> is added to or subtracted from the +section address. See the comments under <samp>--change-addresses</samp>, +above. If <var>sectionpattern</var> does not match any sections in the +input file, a warning will be issued, unless +<samp>--no-change-warnings</samp> is used. +</p> +</dd> +<dt><code>--change-warnings</code></dt> +<dt><code>--adjust-warnings</code></dt> +<dd><p>If <samp>--change-section-address</samp> or <samp>--change-section-lma</samp> or +<samp>--change-section-vma</samp> is used, and the section pattern does not +match any sections, issue a warning. This is the default. +</p> +</dd> +<dt><code>--no-change-warnings</code></dt> +<dt><code>--no-adjust-warnings</code></dt> +<dd><p>Do not issue a warning if <samp>--change-section-address</samp> or +<samp>--adjust-section-lma</samp> or <samp>--adjust-section-vma</samp> is used, even +if the section pattern does not match any sections. +</p> +</dd> +<dt><code>--set-section-flags <var>sectionpattern</var>=<var>flags</var></code></dt> +<dd><p>Set the flags for any sections matching <var>sectionpattern</var>. The +<var>flags</var> argument is a comma separated string of flag names. The +recognized names are ‘<samp>alloc</samp>’, ‘<samp>contents</samp>’, ‘<samp>load</samp>’, +‘<samp>noload</samp>’, ‘<samp>readonly</samp>’, ‘<samp>code</samp>’, ‘<samp>data</samp>’, ‘<samp>rom</samp>’, +‘<samp>exclude</samp>’, ‘<samp>share</samp>’, and ‘<samp>debug</samp>’. You can set the +‘<samp>contents</samp>’ flag for a section which does not have contents, but it +is not meaningful to clear the ‘<samp>contents</samp>’ flag of a section which +does have contents–just remove the section instead. Not all flags are +meaningful for all object file formats. In particular the +‘<samp>share</samp>’ flag is only meaningful for COFF format files and not for +ELF format files. +</p> +</dd> +<dt><code>--set-section-alignment <var>sectionpattern</var>=<var>align</var></code></dt> +<dd><p>Set the alignment for any sections matching <var>sectionpattern</var>. +<var>align</var> specifies the alignment in bytes and must be a power of +two, i.e. 1, 2, 4, 8…. +</p> +</dd> +<dt><code>--add-section <var>sectionname</var>=<var>filename</var></code></dt> +<dd><p>Add a new section named <var>sectionname</var> while copying the file. The +contents of the new section are taken from the file <var>filename</var>. The +size of the section will be the size of the file. This option only +works on file formats which can support sections with arbitrary names. +Note - it may be necessary to use the <samp>--set-section-flags</samp> +option to set the attributes of the newly created section. +</p> +</dd> +<dt><code>--dump-section <var>sectionname</var>=<var>filename</var></code></dt> +<dd><p>Place the contents of section named <var>sectionname</var> into the file +<var>filename</var>, overwriting any contents that may have been there +previously. This option is the inverse of <samp>--add-section</samp>. +This option is similar to the <samp>--only-section</samp> option except +that it does not create a formatted file, it just dumps the contents +as raw binary data, without applying any relocations. The option can +be specified more than once. +</p> +</dd> +<dt><code>--update-section <var>sectionname</var>=<var>filename</var></code></dt> +<dd><p>Replace the existing contents of a section named <var>sectionname</var> +with the contents of file <var>filename</var>. The size of the section +will be adjusted to the size of the file. The section flags for +<var>sectionname</var> will be unchanged. For ELF format files the section +to segment mapping will also remain unchanged, something which is not +possible using <samp>--remove-section</samp> followed by +<samp>--add-section</samp>. The option can be specified more than once. +</p> +<p>Note - it is possible to use <samp>--rename-section</samp> and +<samp>--update-section</samp> to both update and rename a section from one +command line. In this case, pass the original section name to +<samp>--update-section</samp>, and the original and new section names to +<samp>--rename-section</samp>. +</p> +</dd> +<dt><code>--add-symbol <var>name</var>=[<var>section</var>:]<var>value</var>[,<var>flags</var>]</code></dt> +<dd><p>Add a new symbol named <var>name</var> while copying the file. This option may be +specified multiple times. If the <var>section</var> is given, the symbol will be +associated with and relative to that section, otherwise it will be an ABS +symbol. Specifying an undefined section will result in a fatal error. There +is no check for the value, it will be taken as specified. Symbol flags can +be specified and not all flags will be meaningful for all object file +formats. By default, the symbol will be global. The special flag +’before=<var>othersym</var>’ will insert the new symbol in front of the specified +<var>othersym</var>, otherwise the symbol(s) will be added at the end of the +symbol table in the order they appear. +</p> +</dd> +<dt><code>--rename-section <var>oldname</var>=<var>newname</var>[,<var>flags</var>]</code></dt> +<dd><p>Rename a section from <var>oldname</var> to <var>newname</var>, optionally +changing the section’s flags to <var>flags</var> in the process. This has +the advantage over using a linker script to perform the rename in that +the output stays as an object file and does not become a linked +executable. This option accepts the same set of flags as the +<samp>--sect-section-flags</samp> option. +</p> +<p>This option is particularly helpful when the input format is binary, +since this will always create a section called .data. If for example, +you wanted instead to create a section called .rodata containing binary +data you could use the following command line to achieve it: +</p> +<div class="smallexample"> +<pre class="smallexample"> objcopy -I binary -O <output_format> -B <architecture> \ + --rename-section .data=.rodata,alloc,load,readonly,data,contents \ + <input_binary_file> <output_object_file> +</pre></div> + +</dd> +<dt><code>--long-section-names {enable,disable,keep}</code></dt> +<dd><p>Controls the handling of long section names when processing <code>COFF</code> +and <code>PE-COFF</code> object formats. The default behaviour, ‘<samp>keep</samp>’, +is to preserve long section names if any are present in the input file. +The ‘<samp>enable</samp>’ and ‘<samp>disable</samp>’ options forcibly enable or disable +the use of long section names in the output object; when ‘<samp>disable</samp>’ +is in effect, any long section names in the input object will be truncated. +The ‘<samp>enable</samp>’ option will only emit long section names if any are +present in the inputs; this is mostly the same as ‘<samp>keep</samp>’, but it +is left undefined whether the ‘<samp>enable</samp>’ option might force the +creation of an empty string table in the output file. +</p> +</dd> +<dt><code>--change-leading-char</code></dt> +<dd><p>Some object file formats use special characters at the start of +symbols. The most common such character is underscore, which compilers +often add before every symbol. This option tells <code>objcopy</code> to +change the leading character of every symbol when it converts between +object file formats. If the object file formats use the same leading +character, this option has no effect. Otherwise, it will add a +character, or remove a character, or change a character, as +appropriate. +</p> +</dd> +<dt><code>--remove-leading-char</code></dt> +<dd><p>If the first character of a global symbol is a special symbol leading +character used by the object file format, remove the character. The +most common symbol leading character is underscore. This option will +remove a leading underscore from all global symbols. This can be useful +if you want to link together objects of different file formats with +different conventions for symbol names. This is different from +<samp>--change-leading-char</samp> because it always changes the symbol name +when appropriate, regardless of the object file format of the output +file. +</p> +</dd> +<dt><code>--reverse-bytes=<var>num</var></code></dt> +<dd><p>Reverse the bytes in a section with output contents. A section length must +be evenly divisible by the value given in order for the swap to be able to +take place. Reversing takes place before the interleaving is performed. +</p> +<p>This option is used typically in generating ROM images for problematic +target systems. For example, on some target boards, the 32-bit words +fetched from 8-bit ROMs are re-assembled in little-endian byte order +regardless of the CPU byte order. Depending on the programming model, the +endianness of the ROM may need to be modified. +</p> +<p>Consider a simple file with a section containing the following eight +bytes: <code>12345678</code>. +</p> +<p>Using ‘<samp>--reverse-bytes=2</samp>’ for the above example, the bytes in the +output file would be ordered <code>21436587</code>. +</p> +<p>Using ‘<samp>--reverse-bytes=4</samp>’ for the above example, the bytes in the +output file would be ordered <code>43218765</code>. +</p> +<p>By using ‘<samp>--reverse-bytes=2</samp>’ for the above example, followed by +‘<samp>--reverse-bytes=4</samp>’ on the output file, the bytes in the second +output file would be ordered <code>34127856</code>. +</p> +</dd> +<dt><code>--srec-len=<var>ival</var></code></dt> +<dd><p>Meaningful only for srec output. Set the maximum length of the Srecords +being produced to <var>ival</var>. This length covers both address, data and +crc fields. +</p> +</dd> +<dt><code>--srec-forceS3</code></dt> +<dd><p>Meaningful only for srec output. Avoid generation of S1/S2 records, +creating S3-only record format. +</p> +</dd> +<dt><code>--redefine-sym <var>old</var>=<var>new</var></code></dt> +<dd><p>Change the name of a symbol <var>old</var>, to <var>new</var>. This can be useful +when one is trying link two things together for which you have no +source, and there are name collisions. +</p> +</dd> +<dt><code>--redefine-syms=<var>filename</var></code></dt> +<dd><p>Apply <samp>--redefine-sym</samp> to each symbol pair "<var>old</var> <var>new</var>" +listed in the file <var>filename</var>. <var>filename</var> is simply a flat file, +with one symbol pair per line. Line comments may be introduced by the hash +character. This option may be given more than once. +</p> +</dd> +<dt><code>--weaken</code></dt> +<dd><p>Change all global symbols in the file to be weak. This can be useful +when building an object which will be linked against other objects using +the <samp>-R</samp> option to the linker. This option is only effective when +using an object file format which supports weak symbols. +</p> +</dd> +<dt><code>--keep-symbols=<var>filename</var></code></dt> +<dd><p>Apply <samp>--keep-symbol</samp> option to each symbol listed in the file +<var>filename</var>. <var>filename</var> is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. +</p> +</dd> +<dt><code>--strip-symbols=<var>filename</var></code></dt> +<dd><p>Apply <samp>--strip-symbol</samp> option to each symbol listed in the file +<var>filename</var>. <var>filename</var> is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. +</p> +</dd> +<dt><code>--strip-unneeded-symbols=<var>filename</var></code></dt> +<dd><p>Apply <samp>--strip-unneeded-symbol</samp> option to each symbol listed in +the file <var>filename</var>. <var>filename</var> is simply a flat file, with one +symbol name per line. Line comments may be introduced by the hash +character. This option may be given more than once. +</p> +</dd> +<dt><code>--keep-global-symbols=<var>filename</var></code></dt> +<dd><p>Apply <samp>--keep-global-symbol</samp> option to each symbol listed in the +file <var>filename</var>. <var>filename</var> is simply a flat file, with one +symbol name per line. Line comments may be introduced by the hash +character. This option may be given more than once. +</p> +</dd> +<dt><code>--localize-symbols=<var>filename</var></code></dt> +<dd><p>Apply <samp>--localize-symbol</samp> option to each symbol listed in the file +<var>filename</var>. <var>filename</var> is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. +</p> +</dd> +<dt><code>--globalize-symbols=<var>filename</var></code></dt> +<dd><p>Apply <samp>--globalize-symbol</samp> option to each symbol listed in the file +<var>filename</var>. <var>filename</var> is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. Note: this option cannot be +used in conjunction with the <samp>-G</samp> or <samp>--keep-global-symbol</samp> +options. +</p> +</dd> +<dt><code>--weaken-symbols=<var>filename</var></code></dt> +<dd><p>Apply <samp>--weaken-symbol</samp> option to each symbol listed in the file +<var>filename</var>. <var>filename</var> is simply a flat file, with one symbol +name per line. Line comments may be introduced by the hash character. +This option may be given more than once. +</p> +</dd> +<dt><code>--alt-machine-code=<var>index</var></code></dt> +<dd><p>If the output architecture has alternate machine codes, use the +<var>index</var>th code instead of the default one. This is useful in case +a machine is assigned an official code and the tool-chain adopts the +new code, but other applications still depend on the original code +being used. For ELF based architectures if the <var>index</var> +alternative does not exist then the value is treated as an absolute +number to be stored in the e_machine field of the ELF header. +</p> +</dd> +<dt><code>--writable-text</code></dt> +<dd><p>Mark the output text as writable. This option isn’t meaningful for all +object file formats. +</p> +</dd> +<dt><code>--readonly-text</code></dt> +<dd><p>Make the output text write protected. This option isn’t meaningful for all +object file formats. +</p> +</dd> +<dt><code>--pure</code></dt> +<dd><p>Mark the output file as demand paged. This option isn’t meaningful for all +object file formats. +</p> +</dd> +<dt><code>--impure</code></dt> +<dd><p>Mark the output file as impure. This option isn’t meaningful for all +object file formats. +</p> +</dd> +<dt><code>--prefix-symbols=<var>string</var></code></dt> +<dd><p>Prefix all symbols in the output file with <var>string</var>. +</p> +</dd> +<dt><code>--prefix-sections=<var>string</var></code></dt> +<dd><p>Prefix all section names in the output file with <var>string</var>. +</p> +</dd> +<dt><code>--prefix-alloc-sections=<var>string</var></code></dt> +<dd><p>Prefix all the names of all allocated sections in the output file with +<var>string</var>. +</p> +</dd> +<dt><code>--add-gnu-debuglink=<var>path-to-file</var></code></dt> +<dd><p>Creates a .gnu_debuglink section which contains a reference to +<var>path-to-file</var> and adds it to the output file. Note: the file at +<var>path-to-file</var> must exist. Part of the process of adding the +.gnu_debuglink section involves embedding a checksum of the contents +of the debug info file into the section. +</p> +<p>If the debug info file is built in one location but it is going to be +installed at a later time into a different location then do not use +the path to the installed location. The <samp>--add-gnu-debuglink</samp> +option will fail because the installed file does not exist yet. +Instead put the debug info file in the current directory and use the +<samp>--add-gnu-debuglink</samp> option without any directory components, +like this: +</p> +<div class="smallexample"> +<pre class="smallexample"> objcopy --add-gnu-debuglink=foo.debug +</pre></div> + +<p>At debug time the debugger will attempt to look for the separate debug +info file in a set of known locations. The exact set of these +locations varies depending upon the distribution being used, but it +typically includes: +</p> +<dl compact="compact"> +<dt><code>* The same directory as the executable.</code></dt> +<dt><code>* A sub-directory of the directory containing the executable</code></dt> +<dd><p>called .debug +</p> +</dd> +<dt><code>* A global debug directory such as /usr/lib/debug.</code></dt> +</dl> + +<p>As long as the debug info file has been installed into one of these +locations before the debugger is run everything should work +correctly. +</p> +</dd> +<dt><code>--keep-section-symbils</code></dt> +<dd><p>When stripping a file, perhaps with <samp>--strip-debug</samp> or +<samp>--strip-unneeded</samp>, retain any symbols specifying section names, +which would otherwise get stripped. +</p> +</dd> +<dt><code>--keep-file-symbols</code></dt> +<dd><p>When stripping a file, perhaps with <samp>--strip-debug</samp> or +<samp>--strip-unneeded</samp>, retain any symbols specifying source file names, +which would otherwise get stripped. +</p> +</dd> +<dt><code>--only-keep-debug</code></dt> +<dd><p>Strip a file, removing contents of any sections that would not be +stripped by <samp>--strip-debug</samp> and leaving the debugging sections +intact. In ELF files, this preserves all note sections in the output. +</p> +<p>Note - the section headers of the stripped sections are preserved, +including their sizes, but the contents of the section are discarded. +The section headers are preserved so that other tools can match up the +debuginfo file with the real executable, even if that executable has +been relocated to a different address space. +</p> +<p>The intention is that this option will be used in conjunction with +<samp>--add-gnu-debuglink</samp> to create a two part executable. One a +stripped binary which will occupy less space in RAM and in a +distribution and the second a debugging information file which is only +needed if debugging abilities are required. The suggested procedure +to create these files is as follows: +</p> +<ol> +<li> Link the executable as normal. Assuming that it is called +<code>foo</code> then... +</li><li> Run <code>objcopy --only-keep-debug foo foo.dbg</code> to +create a file containing the debugging info. +</li><li> Run <code>objcopy --strip-debug foo</code> to create a +stripped executable. +</li><li> Run <code>objcopy --add-gnu-debuglink=foo.dbg foo</code> +to add a link to the debugging info into the stripped executable. +</li></ol> + +<p>Note—the choice of <code>.dbg</code> as an extension for the debug info +file is arbitrary. Also the <code>--only-keep-debug</code> step is +optional. You could instead do this: +</p> +<ol> +<li> Link the executable as normal. +</li><li> Copy <code>foo</code> to <code>foo.full</code> +</li><li> Run <code>objcopy --strip-debug foo</code> +</li><li> Run <code>objcopy --add-gnu-debuglink=foo.full foo</code> +</li></ol> + +<p>i.e., the file pointed to by the <samp>--add-gnu-debuglink</samp> can be the +full executable. It does not have to be a file created by the +<samp>--only-keep-debug</samp> switch. +</p> +<p>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. +</p> +</dd> +<dt><code>--strip-dwo</code></dt> +<dd><p>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 <samp>-gsplit-dwarf</samp> 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 <samp>--extract-dwo</samp> option to copy the .dwo sections to +the .dwo file, then the <samp>--strip-dwo</samp> option to remove +those sections from the original .o file. +</p> +</dd> +<dt><code>--extract-dwo</code></dt> +<dd><p>Extract the contents of all DWARF .dwo sections. See the +<samp>--strip-dwo</samp> option for more information. +</p> +</dd> +<dt><code>--file-alignment <var>num</var></code></dt> +<dd><p>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.] +</p> +</dd> +<dt><code>--heap <var>reserve</var></code></dt> +<dt><code>--heap <var>reserve</var>,<var>commit</var></code></dt> +<dd><p>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.] +</p> +</dd> +<dt><code>--image-base <var>value</var></code></dt> +<dd><p>Use <var>value</var> 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.] +</p> +</dd> +<dt><code>--section-alignment <var>num</var></code></dt> +<dd><p>Sets the section alignment field in the PE header. 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.] +</p> +</dd> +<dt><code>--stack <var>reserve</var></code></dt> +<dt><code>--stack <var>reserve</var>,<var>commit</var></code></dt> +<dd><p>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.] +</p> +</dd> +<dt><code>--subsystem <var>which</var></code></dt> +<dt><code>--subsystem <var>which</var>:<var>major</var></code></dt> +<dt><code>--subsystem <var>which</var>:<var>major</var>.<var>minor</var></code></dt> +<dd><p>Specifies the subsystem under which your program will execute. The +legal values for <var>which</var> are <code>native</code>, <code>windows</code>, +<code>console</code>, <code>posix</code>, <code>efi-app</code>, <code>efi-bsd</code>, +<code>efi-rtd</code>, <code>sal-rtd</code>, and <code>xbox</code>. You may optionally set +the subsystem version also. Numeric values are also accepted for +<var>which</var>. +[This option is specific to PE targets.] +</p> +</dd> +<dt><code>--extract-symbol</code></dt> +<dd><p>Keep the file’s section flags and symbols but remove all section data. +Specifically, the option: +</p> +<ul> +<li> removes the contents of all sections; +</li><li> sets the size of every section to zero; and +</li><li> sets the file’s start address to zero. +</li></ul> + +<p>This option is used to build a <samp>.sym</samp> file for a VxWorks kernel. +It can also be a useful way of reducing the size of a <samp>--just-symbols</samp> +linker input file. +</p> +</dd> +<dt><code>--compress-debug-sections</code></dt> +<dd><p>Compress DWARF debug sections using zlib with SHF_COMPRESSED from the +ELF ABI. Note - if compression would actually make a section +<em>larger</em>, then it is not compressed. +</p> +</dd> +<dt><code>--compress-debug-sections=none</code></dt> +<dt><code>--compress-debug-sections=zlib</code></dt> +<dt><code>--compress-debug-sections=zlib-gnu</code></dt> +<dt><code>--compress-debug-sections=zlib-gabi</code></dt> +<dt><code>--compress-debug-sections=zstd</code></dt> +<dd><p>For ELF files, these options control how DWARF debug sections are +compressed. <samp>--compress-debug-sections=none</samp> is equivalent +to <samp>--decompress-debug-sections</samp>. +<samp>--compress-debug-sections=zlib</samp> and +<samp>--compress-debug-sections=zlib-gabi</samp> are equivalent to +<samp>--compress-debug-sections</samp>. +<samp>--compress-debug-sections=zlib-gnu</samp> compresses DWARF debug sections +using the obsoleted zlib-gnu format. The debug sections are renamed to begin +with ‘<samp>.zdebug</samp>’. +<samp>--compress-debug-sections=zstd</samp> compresses DWARF debug +sections using zstd. Note - if compression would actually make a section +<em>larger</em>, then it is not compressed nor renamed. +</p> +</dd> +<dt><code>--decompress-debug-sections</code></dt> +<dd><p>Decompress DWARF debug sections. For a ‘<samp>.zdebug</samp>’ section, the original +name is restored. +</p> +</dd> +<dt><code>--elf-stt-common=yes</code></dt> +<dt><code>--elf-stt-common=no</code></dt> +<dd><p>For ELF files, these options control whether common symbols should be +converted to the <code>STT_COMMON</code> or <code>STT_OBJECT</code> type. +<samp>--elf-stt-common=yes</samp> converts common symbol type to +<code>STT_COMMON</code>. <samp>--elf-stt-common=no</samp> converts common symbol +type to <code>STT_OBJECT</code>. +</p> +</dd> +<dt><code>--merge-notes</code></dt> +<dt><code>--no-merge-notes</code></dt> +<dd><p>For ELF files, attempt (or do not attempt) to reduce the size of any +SHT_NOTE type sections by removing duplicate notes. +</p> +</dd> +<dt><code>-V</code></dt> +<dt><code>--version</code></dt> +<dd><p>Show the version number of <code>objcopy</code>. +</p> +</dd> +<dt><code>--verilog-data-width=<var>bytes</var></code></dt> +<dd><p>For Verilog output, this options controls the number of bytes +converted for each output data element. The input target controls the +endianness of the conversion. +</p> +</dd> +<dt><code>-v</code></dt> +<dt><code>--verbose</code></dt> +<dd><p>Verbose output: list all object files modified. In the case of +archives, ‘<samp>objcopy -V</samp>’ lists all members of the archive. +</p> +</dd> +<dt><code>--help</code></dt> +<dd><p>Show a summary of the options to <code>objcopy</code>. +</p> +</dd> +<dt><code>--info</code></dt> +<dd><p>Display a list showing all architectures and object formats available. +</p></dd> +</dl> + + + +<hr> +<a name="objdump"></a> +<div class="header"> +<p> +Next: <a href="#ranlib" accesskey="n" rel="next">ranlib</a>, Previous: <a href="#objcopy" accesskey="p" rel="previous">objcopy</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="objdump-1"></a> +<h2 class="chapter">4 objdump</h2> + +<a name="index-object-file-information"></a> +<a name="index-objdump"></a> + + +<div class="smallexample"> +<pre class="smallexample">objdump [<samp>-a</samp>|<samp>--archive-headers</samp>] + [<samp>-b</samp> <var>bfdname</var>|<samp>--target=<var>bfdname</var></samp>] + [<samp>-C</samp>|<samp>--demangle</samp>[=<var>style</var>] ] + [<samp>-d</samp>|<samp>--disassemble</samp>[=<var>symbol</var>]] + [<samp>-D</samp>|<samp>--disassemble-all</samp>] + [<samp>-z</samp>|<samp>--disassemble-zeroes</samp>] + [<samp>-EB</samp>|<samp>-EL</samp>|<samp>--endian=</samp>{big | little }] + [<samp>-f</samp>|<samp>--file-headers</samp>] + [<samp>-F</samp>|<samp>--file-offsets</samp>] + [<samp>--file-start-context</samp>] + [<samp>-g</samp>|<samp>--debugging</samp>] + [<samp>-e</samp>|<samp>--debugging-tags</samp>] + [<samp>-h</samp>|<samp>--section-headers</samp>|<samp>--headers</samp>] + [<samp>-i</samp>|<samp>--info</samp>] + [<samp>-j</samp> <var>section</var>|<samp>--section=</samp><var>section</var>] + [<samp>-l</samp>|<samp>--line-numbers</samp>] + [<samp>-S</samp>|<samp>--source</samp>] + [<samp>--source-comment</samp>[=<var>text</var>]] + [<samp>-m</samp> <var>machine</var>|<samp>--architecture=</samp><var>machine</var>] + [<samp>-M</samp> <var>options</var>|<samp>--disassembler-options=</samp><var>options</var>] + [<samp>-p</samp>|<samp>--private-headers</samp>] + [<samp>-P</samp> <var>options</var>|<samp>--private=</samp><var>options</var>] + [<samp>-r</samp>|<samp>--reloc</samp>] + [<samp>-R</samp>|<samp>--dynamic-reloc</samp>] + [<samp>-s</samp>|<samp>--full-contents</samp>] + [<samp>-W[lLiaprmfFsoORtUuTgAck]</samp>| + <samp>--dwarf</samp>[=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]] + [<samp>-WK</samp>|<samp>--dwarf=follow-links</samp>] + [<samp>-WN</samp>|<samp>--dwarf=no-follow-links</samp>] + [<samp>-wD</samp>|<samp>--dwarf=use-debuginfod</samp>] + [<samp>-wE</samp>|<samp>--dwarf=do-not-use-debuginfod</samp>] + [<samp>-L</samp>|<samp>--process-links</samp>] + [<samp>--ctf=</samp><var>section</var>] + [<samp>--sframe=</samp><var>section</var>] + [<samp>-G</samp>|<samp>--stabs</samp>] + [<samp>-t</samp>|<samp>--syms</samp>] + [<samp>-T</samp>|<samp>--dynamic-syms</samp>] + [<samp>-x</samp>|<samp>--all-headers</samp>] + [<samp>-w</samp>|<samp>--wide</samp>] + [<samp>--start-address=</samp><var>address</var>] + [<samp>--stop-address=</samp><var>address</var>] + [<samp>--no-addresses</samp>] + [<samp>--prefix-addresses</samp>] + [<samp>--[no-]show-raw-insn</samp>] + [<samp>--adjust-vma=</samp><var>offset</var>] + [<samp>--show-all-symbols</samp>] + [<samp>--dwarf-depth=<var>n</var></samp>] + [<samp>--dwarf-start=<var>n</var></samp>] + [<samp>--ctf-parent=</samp><var>section</var>] + [<samp>--no-recurse-limit</samp>|<samp>--recurse-limit</samp>] + [<samp>--special-syms</samp>] + [<samp>--prefix=</samp><var>prefix</var>] + [<samp>--prefix-strip=</samp><var>level</var>] + [<samp>--insn-width=</samp><var>width</var>] + [<samp>--visualize-jumps[=color|=extended-color|=off]</samp> + [<samp>--disassembler-color=[off|terminal|on|extended]</samp> + [<samp>-U</samp> <var>method</var>] [<samp>--unicode=</samp><var>method</var>] + [<samp>-V</samp>|<samp>--version</samp>] + [<samp>-H</samp>|<samp>--help</samp>] + <var>objfile</var>… +</pre></div> + + +<p><code>objdump</code> displays information about one or more object files. +The options control what particular information to display. This +information is mostly useful to programmers who are working on the +compilation tools, as opposed to programmers who just want their +program to compile and work. +</p> +<p><var>objfile</var>… are the object files to be examined. When you +specify archives, <code>objdump</code> shows information on each of the member +object files. +</p> + + +<p>The long and short forms of options, shown here as alternatives, are +equivalent. At least one option from the list +<samp>-a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-P,-r,-R,-s,-S,-t,-T,-V,-x</samp> must be given. +</p> +<dl compact="compact"> +<dt><code>-a</code></dt> +<dt><code>--archive-header</code></dt> +<dd><a name="index-archive-headers"></a> +<p>If any of the <var>objfile</var> files are archives, display the archive +header information (in a format similar to ‘<samp>ls -l</samp>’). Besides the +information you could list with ‘<samp>ar tv</samp>’, ‘<samp>objdump -a</samp>’ shows +the object file format of each archive member. +</p> +</dd> +<dt><code>--adjust-vma=<var>offset</var></code></dt> +<dd><a name="index-section-addresses-in-objdump"></a> +<a name="index-VMA-in-objdump"></a> +<p>When dumping information, first add <var>offset</var> to all the section +addresses. This is useful if the section addresses do not correspond to +the symbol table, which can happen when putting sections at particular +addresses when using a format which can not represent section addresses, +such as a.out. +</p> +</dd> +<dt><code>-b <var>bfdname</var></code></dt> +<dt><code>--target=<var>bfdname</var></code></dt> +<dd><a name="index-object-code-format-1"></a> +<p>Specify that the object-code format for the object files is +<var>bfdname</var>. This option may not be necessary; <var>objdump</var> can +automatically recognize many formats. +</p> +<p>For example, +</p><div class="example"> +<pre class="example">objdump -b oasys -m vax -h fu.o +</pre></div> +<p>displays summary information from the section headers (<samp>-h</samp>) of +<samp>fu.o</samp>, which is explicitly identified (<samp>-m</samp>) as a VAX object +file in the format produced by Oasys compilers. You can list the +formats available with the <samp>-i</samp> option. +See <a href="#Target-Selection">Target Selection</a>, for more information. +</p> +</dd> +<dt><code>-C</code></dt> +<dt><code>--demangle[=<var>style</var>]</code></dt> +<dd><a name="index-demangling-in-objdump"></a> +<p>Decode (<em>demangle</em>) low-level symbol names into user-level names. +Besides removing any initial underscore prepended by the system, this +makes C++ function names readable. Different compilers have different +mangling styles. The optional demangling style argument can be used to +choose an appropriate demangling style for your compiler. See <a href="#c_002b_002bfilt">c++filt</a>, +for more information on demangling. +</p> +</dd> +<dt><code>--recurse-limit</code></dt> +<dt><code>--no-recurse-limit</code></dt> +<dt><code>--recursion-limit</code></dt> +<dt><code>--no-recursion-limit</code></dt> +<dd><p>Enables or disables a limit on the amount of recursion performed +whilst demangling strings. Since the name mangling formats allow for +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. +</p> +<p>The default is for this limit to be enabled, but disabling it may be +necessary in order to demangle truly complicated names. Note however +that if the recursion limit is disabled then stack exhaustion is +possible and any bug reports about such an event will be rejected. +</p> +</dd> +<dt><code>-g</code></dt> +<dt><code>--debugging</code></dt> +<dd><p>Display debugging information. This attempts to parse STABS +debugging format information stored in the file and print it out using +a C like syntax. If no STABS debugging was found this option +falls back on the <samp>-W</samp> option to print any DWARF information in +the file. +</p> +</dd> +<dt><code>-e</code></dt> +<dt><code>--debugging-tags</code></dt> +<dd><p>Like <samp>-g</samp>, but the information is generated in a format compatible +with ctags tool. +</p> +</dd> +<dt><code>-d</code></dt> +<dt><code>--disassemble</code></dt> +<dt><code>--disassemble=<var>symbol</var></code></dt> +<dd><a name="index-disassembling-object-code"></a> +<a name="index-machine-instructions"></a> +<p>Display the assembler mnemonics for the machine instructions from the +input file. This option only disassembles those sections which are +expected to contain instructions. If the optional <var>symbol</var> +argument is given, then display the assembler mnemonics starting at +<var>symbol</var>. If <var>symbol</var> is a function name then disassembly +will stop at the end of the function, otherwise it will stop when the +next symbol is encountered. If there are no matches for <var>symbol</var> +then nothing will be displayed. +</p> +<p>Note if the <samp>--dwarf=follow-links</samp> option is enabled +then any symbol tables in linked debug info files will be read in and +used when disassembling. +</p> +</dd> +<dt><code>-D</code></dt> +<dt><code>--disassemble-all</code></dt> +<dd><p>Like <samp>-d</samp>, but disassemble the contents of all non-empty +non-bss sections, not just those expected to contain instructions. +<samp>-j</samp> may be used to select specific sections. +</p> +<p>This option also has a subtle effect on the disassembly of +instructions in code sections. When option <samp>-d</samp> is in effect +objdump will assume that any symbols present in a code section occur +on the boundary between instructions and it will refuse to disassemble +across such a boundary. When option <samp>-D</samp> is in effect however +this assumption is supressed. This means that it is possible for the +output of <samp>-d</samp> and <samp>-D</samp> to differ if, for example, data +is stored in code sections. +</p> +<p>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. +</p> +<p>Note if the <samp>--dwarf=follow-links</samp> option is enabled +then any symbol tables in linked debug info files will be read in and +used when disassembling. +</p> +</dd> +<dt><code>--no-addresses</code></dt> +<dd><p>When disassembling, don’t print addresses on each line or for symbols +and relocation offsets. In combination with <samp>--no-show-raw-insn</samp> +this may be useful for comparing compiler output. +</p> +</dd> +<dt><code>--prefix-addresses</code></dt> +<dd><p>When disassembling, print the complete address on each line. This is +the older disassembly format. +</p> +</dd> +<dt><code>-EB</code></dt> +<dt><code>-EL</code></dt> +<dt><code>--endian={big|little}</code></dt> +<dd><a name="index-endianness"></a> +<a name="index-disassembly-endianness"></a> +<p>Specify the endianness of the object files. This only affects +disassembly. This can be useful when disassembling a file format which +does not describe endianness information, such as S-records. +</p> +</dd> +<dt><code>-f</code></dt> +<dt><code>--file-headers</code></dt> +<dd><a name="index-object-file-header"></a> +<p>Display summary information from the overall header of +each of the <var>objfile</var> files. +</p> +</dd> +<dt><code>-F</code></dt> +<dt><code>--file-offsets</code></dt> +<dd><a name="index-object-file-offsets"></a> +<p>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. +</p> +</dd> +<dt><code>--file-start-context</code></dt> +<dd><a name="index-source-code-context"></a> +<p>Specify that when displaying interlisted source code/disassembly +(assumes <samp>-S</samp>) from a file that has not yet been displayed, extend the +context to the start of the file. +</p> +</dd> +<dt><code>-h</code></dt> +<dt><code>--section-headers</code></dt> +<dt><code>--headers</code></dt> +<dd><a name="index-section-headers"></a> +<p>Display summary information from the section headers of the +object file. +</p> +<p>File segments may be relocated to nonstandard addresses, for example by +using the <samp>-Ttext</samp>, <samp>-Tdata</samp>, or <samp>-Tbss</samp> options to +<code>ld</code>. However, some object file formats, such as a.out, do not +store the starting address of the file segments. In those situations, +although <code>ld</code> relocates the sections correctly, using ‘<samp>objdump +-h</samp>’ to list the file section headers cannot show the correct addresses. +Instead, it shows the usual addresses, which are implicit for the +target. +</p> +<p>Note, in some cases it is possible for a section to have both the +READONLY and the NOREAD attributes set. In such cases the NOREAD +attribute takes precedence, but <code>objdump</code> will report both +since the exact setting of the flag bits might be important. +</p> +</dd> +<dt><code>-H</code></dt> +<dt><code>--help</code></dt> +<dd><p>Print a summary of the options to <code>objdump</code> and exit. +</p> +</dd> +<dt><code>-i</code></dt> +<dt><code>--info</code></dt> +<dd><a name="index-architectures-available"></a> +<a name="index-object-formats-available"></a> +<p>Display a list showing all architectures and object formats available +for specification with <samp>-b</samp> or <samp>-m</samp>. +</p> +</dd> +<dt><code>-j <var>name</var></code></dt> +<dt><code>--section=<var>name</var></code></dt> +<dd><a name="index-section-information"></a> +<p>Display information for section <var>name</var>. This option may be +specified multiple times. +</p> +</dd> +<dt><code>-L</code></dt> +<dt><code>--process-links</code></dt> +<dd><p>Display the contents of non-debug sections found in separate debuginfo +files that are linked to the main file. This option automatically +implies the <samp>-WK</samp> option, and only sections requested by other +command line options will be displayed. +</p> +</dd> +<dt><code>-l</code></dt> +<dt><code>--line-numbers</code></dt> +<dd><a name="index-source-filenames-for-object-files"></a> +<p>Label the display (using debugging information) with the filename and +source line numbers corresponding to the object code or relocs shown. +Only useful with <samp>-d</samp>, <samp>-D</samp>, or <samp>-r</samp>. +</p> +</dd> +<dt><code>-m <var>machine</var></code></dt> +<dt><code>--architecture=<var>machine</var></code></dt> +<dd><a name="index-architecture"></a> +<a name="index-disassembly-architecture"></a> +<p>Specify the architecture to use when disassembling object files. This +can be useful when disassembling object files which do not describe +architecture information, such as S-records. You can list the available +architectures with the <samp>-i</samp> option. +</p> +<p>For most architectures it is possible to supply an architecture +name and a machine name, separated by a colon. For example +‘<samp>foo:bar</samp>’ would refer to the ‘<samp>bar</samp>’ machine type in the +‘<samp>foo</samp>’ architecture. This can be helpful if objdump has been +configured to support multiple architectures. +</p> +<p>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</var>. +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 <samp>-marm</samp>. +</p> +</dd> +<dt><code>-M <var>options</var></code></dt> +<dt><code>--disassembler-options=<var>options</var></code></dt> +<dd><p>Pass target specific information to the disassembler. Only supported on +some targets. If it is necessary to specify more than one +disassembler option then multiple <samp>-M</samp> options can be used or +can be placed together into a comma separated list. +</p> +<p>For ARC, <samp>dsp</samp> controls the printing of DSP instructions, +<samp>spfp</samp> selects the printing of FPX single precision FP +instructions, <samp>dpfp</samp> selects the printing of FPX double +precision FP instructions, <samp>quarkse_em</samp> selects the printing of +special QuarkSE-EM instructions, <samp>fpuda</samp> selects the printing +of double precision assist instructions, <samp>fpus</samp> selects the +printing of FPU single precision FP instructions, while <samp>fpud</samp> +selects the printing of FPU double precision FP instructions. +Additionally, one can choose to have all the immediates printed in +hexadecimal using <samp>hex</samp>. By default, the short immediates are +printed using the decimal representation, while the long immediate +values are printed as hexadecimal. +</p> +<p><samp>cpu=...</samp> allows one to enforce a particular ISA when disassembling +instructions, overriding the <samp>-m</samp> 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 +is for EM or HS. This option might be specified multiple times - only the +latest value will be used. Valid values are same as for the assembler +<samp>-mcpu=...</samp> option. +</p> +<p>If the target is an ARM architecture then this switch can be used to +select which register name set is used during disassembler. Specifying +<samp>-M reg-names-std</samp> (the default) will select the register names as +used in ARM’s instruction set documentation, but with register 13 called +’sp’, register 14 called ’lr’ and register 15 called ’pc’. Specifying +<samp>-M reg-names-apcs</samp> will select the name set used by the ARM +Procedure Call Standard, whilst specifying <samp>-M reg-names-raw</samp> will +just use ‘<samp>r</samp>’ followed by the register number. +</p> +<p>There are also two variants on the APCS register naming scheme enabled +by <samp>-M reg-names-atpcs</samp> and <samp>-M reg-names-special-atpcs</samp> which +use the ARM/Thumb Procedure Call Standard naming conventions. (Either +with the normal register names or the special register names). +</p> +<p>This option can also be used for ARM architectures to force the +disassembler to interpret all instructions as Thumb instructions by +using the switch <samp>--disassembler-options=force-thumb</samp>. This can be +useful when attempting to disassemble thumb code produced by other +compilers. +</p> +<p>For AArch64 targets this switch can be used to set whether instructions are +disassembled as the most general instruction using the <samp>-M no-aliases</samp> +option or whether instruction notes should be generated as comments in the +disasssembly using <samp>-M notes</samp>. +</p> +<p>For the x86, some of the options duplicate functions of the <samp>-m</samp> +switch, but allow finer grained control. +</p><dl compact="compact"> +<dt><code>x86-64</code></dt> +<dt><code>i386</code></dt> +<dt><code>i8086</code></dt> +<dd><p>Select disassembly for the given architecture. +</p> +</dd> +<dt><code>intel</code></dt> +<dt><code>att</code></dt> +<dd><p>Select between intel syntax mode and AT&T syntax mode. +</p> +</dd> +<dt><code>amd64</code></dt> +<dt><code>intel64</code></dt> +<dd><p>Select between AMD64 ISA and Intel64 ISA. +</p> +</dd> +<dt><code>intel-mnemonic</code></dt> +<dt><code>att-mnemonic</code></dt> +<dd><p>Select between intel mnemonic mode and AT&T mnemonic mode. +Note: <code>intel-mnemonic</code> implies <code>intel</code> and +<code>att-mnemonic</code> implies <code>att</code>. +</p> +</dd> +<dt><code>addr64</code></dt> +<dt><code>addr32</code></dt> +<dt><code>addr16</code></dt> +<dt><code>data32</code></dt> +<dt><code>data16</code></dt> +<dd><p>Specify the default address size and operand size. These five options +will be overridden if <code>x86-64</code>, <code>i386</code> or <code>i8086</code> +appear later in the option string. +</p> +</dd> +<dt><code>suffix</code></dt> +<dd><p>When in AT&T mode and also for a limited set of instructions when in Intel +mode, instructs the disassembler to print a mnemonic suffix even when the +suffix could be inferred by the operands or, for certain instructions, the +execution mode’s defaults. +</p></dd> +</dl> + +<p>For PowerPC, the <samp>-M</samp> argument <samp>raw</samp> selects +disasssembly of hardware insns rather than aliases. For example, you +will see <code>rlwinm</code> rather than <code>clrlwi</code>, and <code>addi</code> +rather than <code>li</code>. All of the <samp>-m</samp> arguments for +<code>gas</code> that select a CPU are supported. These are: +<samp>403</samp>, <samp>405</samp>, <samp>440</samp>, <samp>464</samp>, <samp>476</samp>, +<samp>601</samp>, <samp>603</samp>, <samp>604</samp>, <samp>620</samp>, <samp>7400</samp>, +<samp>7410</samp>, <samp>7450</samp>, <samp>7455</samp>, <samp>750cl</samp>, +<samp>821</samp>, <samp>850</samp>, <samp>860</samp>, <samp>a2</samp>, <samp>booke</samp>, +<samp>booke32</samp>, <samp>cell</samp>, <samp>com</samp>, <samp>e200z2</samp>, <samp>e200z4</samp>, +<samp>e300</samp>, <samp>e500</samp>, <samp>e500mc</samp>, <samp>e500mc64</samp>, +<samp>e500x2</samp>, <samp>e5500</samp>, <samp>e6500</samp>, <samp>efs</samp>, +<samp>power4</samp>, <samp>power5</samp>, <samp>power6</samp>, <samp>power7</samp>, +<samp>power8</samp>, <samp>power9</samp>, <samp>power10</samp>, <samp>ppc</samp>, +<samp>ppc32</samp>, <samp>ppc64</samp>, <samp>ppc64bridge</samp>, <samp>ppcps</samp>, +<samp>pwr</samp>, <samp>pwr2</samp>, <samp>pwr4</samp>, <samp>pwr5</samp>, <samp>pwr5x</samp>, +<samp>pwr6</samp>, <samp>pwr7</samp>, <samp>pwr8</samp>, <samp>pwr9</samp>, <samp>pwr10</samp>, +<samp>pwrx</samp>, <samp>titan</samp>, <samp>vle</samp>, and <samp>future</samp>. +<samp>32</samp> and <samp>64</samp> modify the default or a prior CPU +selection, disabling and enabling 64-bit insns respectively. In +addition, <samp>altivec</samp>, <samp>any</samp>, <samp>lsp</samp>, <samp>htm</samp>, +<samp>vsx</samp>, <samp>spe</samp> and <samp>spe2</samp> add capabilities to a +previous <em>or later</em> CPU selection. +<samp>any</samp> 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 +chosen from information gleaned by BFD from the object files headers, +but the result again may not be as you expect. +</p> +<p>For MIPS, this option controls the printing of instruction mnemonic +names and register names in disassembled instructions. Multiple +selections from the following may be specified as a comma separated +string, and invalid options are ignored: +</p> +<dl compact="compact"> +<dt><code>no-aliases</code></dt> +<dd><p>Print the ’raw’ instruction mnemonic instead of some pseudo +instruction mnemonic. I.e., print ’daddu’ or ’or’ instead of ’move’, +’sll’ instead of ’nop’, etc. +</p> +</dd> +<dt><code>msa</code></dt> +<dd><p>Disassemble MSA instructions. +</p> +</dd> +<dt><code>virt</code></dt> +<dd><p>Disassemble the virtualization ASE instructions. +</p> +</dd> +<dt><code>xpa</code></dt> +<dd><p>Disassemble the eXtended Physical Address (XPA) ASE instructions. +</p> +</dd> +<dt><code>gpr-names=<var>ABI</var></code></dt> +<dd><p>Print GPR (general-purpose register) names as appropriate +for the specified ABI. By default, GPR names are selected according to +the ABI of the binary being disassembled. +</p> +</dd> +<dt><code>fpr-names=<var>ABI</var></code></dt> +<dd><p>Print FPR (floating-point register) names as +appropriate for the specified ABI. By default, FPR numbers are printed +rather than names. +</p> +</dd> +<dt><code>cp0-names=<var>ARCH</var></code></dt> +<dd><p>Print CP0 (system control coprocessor; coprocessor 0) register names +as appropriate for the CPU or architecture specified by +<var>ARCH</var>. By default, CP0 register names are selected according to +the architecture and CPU of the binary being disassembled. +</p> +</dd> +<dt><code>hwr-names=<var>ARCH</var></code></dt> +<dd><p>Print HWR (hardware register, used by the <code>rdhwr</code> instruction) names +as appropriate for the CPU or architecture specified by +<var>ARCH</var>. By default, HWR names are selected according to +the architecture and CPU of the binary being disassembled. +</p> +</dd> +<dt><code>reg-names=<var>ABI</var></code></dt> +<dd><p>Print GPR and FPR names as appropriate for the selected ABI. +</p> +</dd> +<dt><code>reg-names=<var>ARCH</var></code></dt> +<dd><p>Print CPU-specific register names (CP0 register and HWR names) +as appropriate for the selected CPU or architecture. +</p></dd> +</dl> + +<p>For any of the options listed above, <var>ABI</var> or +<var>ARCH</var> may be specified as ‘<samp>numeric</samp>’ to have numbers printed +rather than names, for the selected types of registers. +You can list the available values of <var>ABI</var> and <var>ARCH</var> using +the <samp>--help</samp> option. +</p> +<p>For VAX, you can specify function entry addresses with <samp>-M +entry:0xf00ba</samp>. You can use this multiple times to properly +disassemble VAX binary files that don’t contain symbol tables (like +ROM dumps). In these cases, the function entry mask would otherwise +be decoded as VAX instructions, which would probably lead the rest +of the function being wrongly disassembled. +</p> +</dd> +<dt><code>-p</code></dt> +<dt><code>--private-headers</code></dt> +<dd><p>Print information that is specific to the object file format. The exact +information printed depends upon the object file format. For some +object file formats, no additional information is printed. +</p> +</dd> +<dt><code>-P <var>options</var></code></dt> +<dt><code>--private=<var>options</var></code></dt> +<dd><p>Print information that is specific to the object file format. The +argument <var>options</var> is a comma separated list that depends on the +format (the lists of options is displayed with the help). +</p> +<p>For XCOFF, the available options are: +</p><dl compact="compact"> +<dt><code>header</code></dt> +<dt><code>aout</code></dt> +<dt><code>sections</code></dt> +<dt><code>syms</code></dt> +<dt><code>relocs</code></dt> +<dt><code>lineno,</code></dt> +<dt><code>loader</code></dt> +<dt><code>except</code></dt> +<dt><code>typchk</code></dt> +<dt><code>traceback</code></dt> +<dt><code>toc</code></dt> +<dt><code>ldinfo</code></dt> +</dl> + +<p>For PE, the available options are: +</p><dl compact="compact"> +<dt><code>header</code></dt> +<dt><code>sections</code></dt> +</dl> + +<p>Not all object formats support this option. In particular the ELF +format does not use it. +</p> +</dd> +<dt><code>-r</code></dt> +<dt><code>--reloc</code></dt> +<dd><a name="index-relocation-entries_002c-in-object-file"></a> +<p>Print the relocation entries of the file. If used with <samp>-d</samp> or +<samp>-D</samp>, the relocations are printed interspersed with the +disassembly. +</p> +</dd> +<dt><code>-R</code></dt> +<dt><code>--dynamic-reloc</code></dt> +<dd><a name="index-dynamic-relocation-entries_002c-in-object-file"></a> +<p>Print the dynamic relocation entries of the file. This is only +meaningful for dynamic objects, such as certain types of shared +libraries. As for <samp>-r</samp>, if used with <samp>-d</samp> or +<samp>-D</samp>, the relocations are printed interspersed with the +disassembly. +</p> +</dd> +<dt><code>-s</code></dt> +<dt><code>--full-contents</code></dt> +<dd><a name="index-sections_002c-full-contents"></a> +<a name="index-object-file-sections"></a> +<p>Display the full contents of sections, often used in combination with +<samp>-j</samp> to request specific sections. By default all non-empty +non-bss sections are displayed. +</p> +</dd> +<dt><code>-S</code></dt> +<dt><code>--source</code></dt> +<dd><a name="index-source-disassembly"></a> +<a name="index-disassembly_002c-with-source"></a> +<p>Display source code intermixed with disassembly, if possible. Implies +<samp>-d</samp>. +</p> +</dd> +<dt><code>--show-all-symbols</code></dt> +<dd><p>When disassembling, show all the symbols that match a given address, +not just the first one. +</p> +</dd> +<dt><code>--source-comment[=<var>txt</var>]</code></dt> +<dd><a name="index-source-disassembly-1"></a> +<a name="index-disassembly_002c-with-source-1"></a> +<p>Like the <samp>-S</samp> option, but all source code lines are displayed +with a prefix of <var>txt</var>. Typically <var>txt</var> will be a comment +string which can be used to distinguish the assembler code from the +source code. If <var>txt</var> is not provided then a default string of +<var>“# “</var> (hash followed by a space), will be used. +</p> +</dd> +<dt><code>--prefix=<var>prefix</var></code></dt> +<dd><a name="index-Add-prefix-to-absolute-paths"></a> +<p>Specify <var>prefix</var> to add to the absolute paths when used with +<samp>-S</samp>. +</p> +</dd> +<dt><code>--prefix-strip=<var>level</var></code></dt> +<dd><a name="index-Strip-absolute-paths"></a> +<p>Indicate how many initial directory names to strip off the hardwired +absolute paths. It has no effect without <samp>--prefix=</samp><var>prefix</var>. +</p> +</dd> +<dt><code>--show-raw-insn</code></dt> +<dd><p>When disassembling instructions, print the instruction in hex as well as +in symbolic form. This is the default except when +<samp>--prefix-addresses</samp> is used. +</p> +</dd> +<dt><code>--no-show-raw-insn</code></dt> +<dd><p>When disassembling instructions, do not print the instruction bytes. +This is the default when <samp>--prefix-addresses</samp> is used. +</p> +</dd> +<dt><code>--insn-width=<var>width</var></code></dt> +<dd><a name="index-Instruction-width"></a> +<p>Display <var>width</var> bytes on a single line when disassembling +instructions. +</p> +</dd> +<dt><code>--visualize-jumps[=color|=extended-color|=off]</code></dt> +<dd><p>Visualize jumps that stay inside a function by drawing ASCII art between +the start and target addresses. The optional <samp>=color</samp> argument +adds color to the output using simple terminal colors. Alternatively +the <samp>=extended-color</samp> argument will add color using 8bit +colors, but these might not work on all terminals. +</p> +<p>If it is necessary to disable the <samp>visualize-jumps</samp> option +after it has previously been enabled then use +<samp>visualize-jumps=off</samp>. +</p> +</dd> +<dt><code>--disassembler-color=off</code></dt> +<dt><code>--disassembler-color=terminal</code></dt> +<dt><code>--disassembler-color=on|color|colour</code></dt> +<dt><code>--disassembler-color=extened|extended-color|extened-colour</code></dt> +<dd><p>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. +</p> +<p>The <samp>on</samp> argument adds colors using simple terminal colors. +</p> +<p>The <samp>terminal</samp> argument does the same, but only if the output +device is a terminal. +</p> +<p>The <samp>extended-color</samp> argument is similar to the <samp>on</samp> +argument, but it uses 8-bit colors. These may not work on all +terminals. +</p> +<p>The <samp>off</samp> argument disables colored disassembly. +</p> +</dd> +<dt><code>-W[lLiaprmfFsoORtUuTgAckK]</code></dt> +<dt><code>--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]</code></dt> +<dd> +<p>Displays the contents of the DWARF debug sections in the file, if any +are present. Compressed debug sections are automatically decompressed +(temporarily) before they are displayed. If one or more of the +optional letters or words follows the switch then only those type(s) +of data will be dumped. The letters and words refer to the following +information: +</p> +<dl compact="compact"> +<dt><code>a</code></dt> +<dt><code>=abbrev</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_abbrev</samp>’ section. +</p> +</dd> +<dt><code>A</code></dt> +<dt><code>=addr</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_addr</samp>’ section. +</p> +</dd> +<dt><code>c</code></dt> +<dt><code>=cu_index</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_cu_index</samp>’ and/or +‘<samp>.debug_tu_index</samp>’ sections. +</p> +</dd> +<dt><code>f</code></dt> +<dt><code>=frames</code></dt> +<dd><p>Display the raw contents of a ‘<samp>.debug_frame</samp>’ section. +</p> +</dd> +<dt><code>F</code></dt> +<dt><code>=frames-interp</code></dt> +<dd><p>Display the interpreted contents of a ‘<samp>.debug_frame</samp>’ section. +</p> +</dd> +<dt><code>g</code></dt> +<dt><code>=gdb_index</code></dt> +<dd><p>Displays the contents of the ‘<samp>.gdb_index</samp>’ and/or +‘<samp>.debug_names</samp>’ sections. +</p> +</dd> +<dt><code>i</code></dt> +<dt><code>=info</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_info</samp>’ section. Note: the +output from this option can also be restricted by the use of the +<samp>--dwarf-depth</samp> and <samp>--dwarf-start</samp> options. +</p> +</dd> +<dt><code>k</code></dt> +<dt><code>=links</code></dt> +<dd><p>Displays the contents of the ‘<samp>.gnu_debuglink</samp>’, +‘<samp>.gnu_debugaltlink</samp>’ and ‘<samp>.debug_sup</samp>’ sections, if any of +them are present. Also displays any links to separate dwarf object +files (dwo), if they are specified by the DW_AT_GNU_dwo_name or +DW_AT_dwo_name attributes in the ‘<samp>.debug_info</samp>’ section. +</p> +</dd> +<dt><code>K</code></dt> +<dt><code>=follow-links</code></dt> +<dd><p>Display the contents of any selected debug sections that are found in +linked, separate debug info file(s). This can result in multiple +versions of the same debug section being displayed if it exists in +more than one file. +</p> +<p>In addition, when displaying DWARF attributes, if a form is found that +references the separate debug info file, then the referenced contents +will also be displayed. +</p> +<p>Note - in some distributions this option is enabled by default. It +can be disabled via the <samp>N</samp> debug option. The default can be +chosen when configuring the binutils via the +<samp>--enable-follow-debug-links=yes</samp> or +<samp>--enable-follow-debug-links=no</samp> options. If these are not +used then the default is to enable the following of debug links. +</p> +<p>Note - if support for the debuginfod protocol was enabled when the +binutils were built then this option will also include an attempt to +contact any debuginfod servers mentioned in the <var>DEBUGINFOD_URLS</var> +environment variable. This could take some time to resolve. This +behaviour can be disabled via the <samp>=do-not-use-debuginfod</samp> debug +option. +</p> +</dd> +<dt><code>N</code></dt> +<dt><code>=no-follow-links</code></dt> +<dd><p>Disables the following of links to separate debug info files. +</p> +</dd> +<dt><code>D</code></dt> +<dt><code>=use-debuginfod</code></dt> +<dd><p>Enables contacting debuginfod servers if there is a need to follow +debug links. This is the default behaviour. +</p> +</dd> +<dt><code>E</code></dt> +<dt><code>=do-not-use-debuginfod</code></dt> +<dd><p>Disables contacting debuginfod servers when there is a need to follow +debug links. +</p> +</dd> +<dt><code>l</code></dt> +<dt><code>=rawline</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_line</samp>’ section in a raw +format. +</p> +</dd> +<dt><code>L</code></dt> +<dt><code>=decodedline</code></dt> +<dd><p>Displays the interpreted contents of the ‘<samp>.debug_line</samp>’ section. +</p> +</dd> +<dt><code>m</code></dt> +<dt><code>=macro</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_macro</samp>’ and/or +‘<samp>.debug_macinfo</samp>’ sections. +</p> +</dd> +<dt><code>o</code></dt> +<dt><code>=loc</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_loc</samp>’ and/or +‘<samp>.debug_loclists</samp>’ sections. +</p> +</dd> +<dt><code>O</code></dt> +<dt><code>=str-offsets</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_str_offsets</samp>’ section. +</p> +</dd> +<dt><code>p</code></dt> +<dt><code>=pubnames</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_pubnames</samp>’ and/or +‘<samp>.debug_gnu_pubnames</samp>’ sections. +</p> +</dd> +<dt><code>r</code></dt> +<dt><code>=aranges</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_aranges</samp>’ section. +</p> +</dd> +<dt><code>R</code></dt> +<dt><code>=Ranges</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_ranges</samp>’ and/or +‘<samp>.debug_rnglists</samp>’ sections. +</p> +</dd> +<dt><code>s</code></dt> +<dt><code>=str</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_str</samp>’, ‘<samp>.debug_line_str</samp>’ +and/or ‘<samp>.debug_str_offsets</samp>’ sections. +</p> +</dd> +<dt><code>t</code></dt> +<dt><code>=pubtype</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_pubtypes</samp>’ and/or +‘<samp>.debug_gnu_pubtypes</samp>’ sections. +</p> +</dd> +<dt><code>T</code></dt> +<dt><code>=trace_aranges</code></dt> +<dd><p>Displays the contents of the ‘<samp>.trace_aranges</samp>’ section. +</p> +</dd> +<dt><code>u</code></dt> +<dt><code>=trace_abbrev</code></dt> +<dd><p>Displays the contents of the ‘<samp>.trace_abbrev</samp>’ section. +</p> +</dd> +<dt><code>U</code></dt> +<dt><code>=trace_info</code></dt> +<dd><p>Displays the contents of the ‘<samp>.trace_info</samp>’ section. +</p> +</dd> +</dl> + +<p>Note: displaying the contents of ‘<samp>.debug_static_funcs</samp>’, +‘<samp>.debug_static_vars</samp>’ and ‘<samp>debug_weaknames</samp>’ sections is not +currently supported. +</p> +</dd> +<dt><code>--dwarf-depth=<var>n</var></code></dt> +<dd><p>Limit the dump of the <code>.debug_info</code> section to <var>n</var> children. +This is only useful with <samp>--debug-dump=info</samp>. The default is +to print all DIEs; the special value 0 for <var>n</var> will also have this +effect. +</p> +<p>With a non-zero value for <var>n</var>, DIEs at or deeper than <var>n</var> +levels will not be printed. The range for <var>n</var> is zero-based. +</p> +</dd> +<dt><code>--dwarf-start=<var>n</var></code></dt> +<dd><p>Print only DIEs beginning with the DIE numbered <var>n</var>. This is only +useful with <samp>--debug-dump=info</samp>. +</p> +<p>If specified, this option will suppress printing of any header +information and all DIEs before the DIE numbered <var>n</var>. Only +siblings and children of the specified DIE will be printed. +</p> +<p>This can be used in conjunction with <samp>--dwarf-depth</samp>. +</p> + +</dd> +<dt><code>--dwarf-check</code></dt> +<dd><p>Enable additional checks for consistency of Dwarf information. +</p> + +</dd> +<dt><code>--ctf[=<var>section</var>]</code></dt> +<dd><a name="index-CTF"></a> +<a name="index-Compact-Type-Format"></a> + +<p>Display the contents of the specified CTF section. CTF sections themselves +contain many subsections, all of which are displayed in order. +</p> +<p>By default, display the name of the section named <var>.ctf</var>, which is the +name emitted by <code>ld</code>. +</p> +</dd> +<dt><code>--ctf-parent=<var>member</var></code></dt> +<dd> +<p>If the CTF section contains ambiguously-defined types, it will consist +of an archive of many CTF dictionaries, all inheriting from one +dictionary containing unambiguous types. This member is by default +named <var>.ctf</var>, like the section containing it, but it is possible to +change this name using the <code>ctf_link_set_memb_name_changer</code> +function at link time. When looking at CTF archives that have been +created by a linker that uses the name changer to rename the parent +archive member, <samp>--ctf-parent</samp> can be used to specify the name +used for the parent. +</p> + +</dd> +<dt><code>--sframe[=<var>section</var>]</code></dt> +<dd><a name="index-SFrame"></a> + +<p>Display the contents of the specified SFrame section. +</p> +<p>By default, display the name of the section named <var>.sframe</var>, which is the +name emitted by <code>ld</code>. +</p> +</dd> +<dt><code>-G</code></dt> +<dt><code>--stabs</code></dt> +<dd><a name="index-stab"></a> +<a name="index-_002estab"></a> +<a name="index-debug-symbols"></a> +<a name="index-ELF-object-file-format"></a> +<p>Display the full contents of any sections requested. Display the +contents of the .stab and .stab.index and .stab.excl sections from an +ELF file. This is only useful on systems (such as Solaris 2.0) in which +<code>.stab</code> debugging symbol-table entries are carried in an ELF +section. In most other file formats, debugging symbol-table entries are +interleaved with linkage symbols, and are visible in the <samp>--syms</samp> +output. +</p> +</dd> +<dt><code>--start-address=<var>address</var></code></dt> +<dd><a name="index-start_002daddress"></a> +<p>Start displaying data at the specified address. This affects the output +of the <samp>-d</samp>, <samp>-r</samp> and <samp>-s</samp> options. +</p> +</dd> +<dt><code>--stop-address=<var>address</var></code></dt> +<dd><a name="index-stop_002daddress"></a> +<p>Stop displaying data at the specified address. This affects the output +of the <samp>-d</samp>, <samp>-r</samp> and <samp>-s</samp> options. +</p> +</dd> +<dt><code>-t</code></dt> +<dt><code>--syms</code></dt> +<dd><a name="index-symbol-table-entries_002c-printing"></a> +<p>Print the symbol table entries of the file. +This is similar to the information provided by the ‘<samp>nm</samp>’ program, +although the display format is different. The format of the output +depends upon the format of the file being dumped, but there are two main +types. One looks like this: +</p> +<div class="smallexample"> +<pre class="smallexample">[ 4](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss +[ 6](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x00000000 fred +</pre></div> + +<p>where the number inside the square brackets is the number of the entry +in the symbol table, the <var>sec</var> number is the section number, the +<var>fl</var> value are the symbol’s flag bits, the <var>ty</var> number is the +symbol’s type, the <var>scl</var> number is the symbol’s storage class and +the <var>nx</var> value is the number of auxiliary entries associated with +the symbol. The last two fields are the symbol’s value and its name. +</p> +<p>The other common output format, usually seen with ELF based files, +looks like this: +</p> +<div class="smallexample"> +<pre class="smallexample">00000000 l d .bss 00000000 .bss +00000000 g .text 00000000 fred +</pre></div> + +<p>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 +symbol is associated or <em>*ABS*</em> if the section is absolute (ie +not connected with any section), or <em>*UND*</em> if the section is +referenced in the file being dumped, but not defined there. +</p> +<p>After the section name comes another field, a number, which for common +symbols is the alignment and for other symbol is the size. Finally +the symbol’s name is displayed. +</p> +<p>The flag characters are divided into 7 groups as follows: +</p><dl compact="compact"> +<dt><code>l</code></dt> +<dt><code>g</code></dt> +<dt><code>u</code></dt> +<dt><code>!</code></dt> +<dd><p>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. 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. +</p> +</dd> +<dt><code>w</code></dt> +<dd><p>The symbol is weak (w) or strong (a space). +</p> +</dd> +<dt><code>C</code></dt> +<dd><p>The symbol denotes a constructor (C) or an ordinary symbol (a space). +</p> +</dd> +<dt><code>W</code></dt> +<dd><p>The symbol is a warning (W) or a normal symbol (a space). A warning +symbol’s name is a message to be displayed if the symbol following the +warning symbol is ever referenced. +</p> +</dd> +<dt><code>I</code></dt> +<dt><code>i</code></dt> +<dd><p>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). +</p> +</dd> +<dt><code>d</code></dt> +<dt><code>D</code></dt> +<dd><p>The symbol is a debugging symbol (d) or a dynamic symbol (D) or a +normal symbol (a space). +</p> +</dd> +<dt><code>F</code></dt> +<dt><code>f</code></dt> +<dt><code>O</code></dt> +<dd><p>The symbol is the name of a function (F) or a file (f) or an object +(O) or just a normal symbol (a space). +</p></dd> +</dl> + +</dd> +<dt><code>-T</code></dt> +<dt><code>--dynamic-syms</code></dt> +<dd><a name="index-dynamic-symbol-table-entries_002c-printing"></a> +<p>Print the dynamic symbol table entries of the file. This is only +meaningful for dynamic objects, such as certain types of shared +libraries. This is similar to the information provided by the ‘<samp>nm</samp>’ +program when given the <samp>-D</samp> (<samp>--dynamic</samp>) option. +</p> +<p>The output format is similar to that produced by the <samp>--syms</samp> +option, except that an extra field is inserted before the symbol’s +name, giving the version information associated with the symbol. +If the version is the default version to be used when resolving +unversioned references to the symbol then it’s displayed as is, +otherwise it’s put into parentheses. +</p> +</dd> +<dt><code>--special-syms</code></dt> +<dd><p>When displaying symbols include those which the target considers to be +special in some way and which would not normally be of interest to the +user. +</p> +</dd> +<dt><code>-U <var>[d|i|l|e|x|h]</var></code></dt> +<dt><code>--unicode=<var>[default|invalid|locale|escape|hex|highlight]</var></code></dt> +<dd><p>Controls the display of UTF-8 encoded multibyte characters in strings. +The default (<samp>--unicode=default</samp>) is to give them no special +treatment. The <samp>--unicode=locale</samp> option displays the sequence +in the current locale, which may or may not support them. The options +<samp>--unicode=hex</samp> and <samp>--unicode=invalid</samp> display them as +hex byte sequences enclosed by either angle brackets or curly braces. +</p> +<p>The <samp>--unicode=escape</samp> option displays them as escape sequences +(<var>\uxxxx</var>) and the <samp>--unicode=highlight</samp> 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. +</p> +</dd> +<dt><code>-V</code></dt> +<dt><code>--version</code></dt> +<dd><p>Print the version number of <code>objdump</code> and exit. +</p> +</dd> +<dt><code>-x</code></dt> +<dt><code>--all-headers</code></dt> +<dd><a name="index-all-header-information_002c-object-file"></a> +<a name="index-header-information_002c-all"></a> +<p>Display all available header information, including the symbol table and +relocation entries. Using <samp>-x</samp> is equivalent to specifying all of +<samp>-a -f -h -p -r -t</samp>. +</p> +</dd> +<dt><code>-w</code></dt> +<dt><code>--wide</code></dt> +<dd><a name="index-wide-output_002c-printing"></a> +<p>Format some lines for output devices that have more than 80 columns. +Also do not truncate symbol names when they are displayed. +</p> +</dd> +<dt><code>-z</code></dt> +<dt><code>--disassemble-zeroes</code></dt> +<dd><p>Normally the disassembly output will skip blocks of zeroes. This +option directs the disassembler to disassemble those blocks, just like +any other data. +</p></dd> +</dl> + + + +<hr> +<a name="ranlib"></a> +<div class="header"> +<p> +Next: <a href="#size" accesskey="n" rel="next">size</a>, Previous: <a href="#objdump" accesskey="p" rel="previous">objdump</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="ranlib-1"></a> +<h2 class="chapter">5 ranlib</h2> + +<a name="index-ranlib-1"></a> +<a name="index-archive-contents"></a> +<a name="index-symbol-index-1"></a> + + +<div class="smallexample"> +<pre class="smallexample">ranlib [<samp>--plugin</samp> <var>name</var>] [<samp>-DhHvVt</samp>] <var>archive</var> +</pre></div> + + +<p><code>ranlib</code> generates an index to the contents of an archive and +stores it in the archive. The index lists each symbol defined by a +member of an archive that is a relocatable object file. +</p> +<p>You may use ‘<samp>nm -s</samp>’ or ‘<samp>nm --print-armap</samp>’ to list this index. +</p> +<p>An archive with such an index speeds up linking to the library and +allows routines in the library to call each other without regard to +their placement in the archive. +</p> +<p>The <small>GNU</small> <code>ranlib</code> program is another form of <small>GNU</small> <code>ar</code>; running +<code>ranlib</code> is completely equivalent to executing ‘<samp>ar -s</samp>’. +See <a href="#ar">ar</a>. +</p> + + +<dl compact="compact"> +<dt><code>-h</code></dt> +<dt><code>-H</code></dt> +<dt><code>--help</code></dt> +<dd><p>Show usage information for <code>ranlib</code>. +</p> +</dd> +<dt><code>-v</code></dt> +<dt><code>-V</code></dt> +<dt><code>--version</code></dt> +<dd><p>Show the version number of <code>ranlib</code>. +</p> +</dd> +<dt><code>-D</code></dt> +<dd><a name="index-deterministic-archives-4"></a> +<a name="index-_002d_002denable_002ddeterministic_002darchives-4"></a> +<p>Operate in <em>deterministic</em> 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. +</p> +<p>If <samp>binutils</samp> was configured with +<samp>--enable-deterministic-archives</samp>, then this mode is on by +default. It can be disabled with the ‘<samp>-U</samp>’ option, described +below. +</p> +</dd> +<dt><code>-t</code></dt> +<dd><p>Update the timestamp of the symbol map of an archive. +</p> +</dd> +<dt><code>-U</code></dt> +<dd><a name="index-deterministic-archives-5"></a> +<a name="index-_002d_002denable_002ddeterministic_002darchives-5"></a> +<p>Do <em>not</em> operate in <em>deterministic</em> mode. This is the +inverse of the ‘<samp>-D</samp>’ option, above: the archive index will get +actual UID, GID, timestamp, and file mode values. +</p> +<p>If <samp>binutils</samp> was configured <em>without</em> +<samp>--enable-deterministic-archives</samp>, then this mode is on by +default. +</p> +</dd> +</dl> + + + +<hr> +<a name="size"></a> +<div class="header"> +<p> +Next: <a href="#strings" accesskey="n" rel="next">strings</a>, Previous: <a href="#ranlib" accesskey="p" rel="previous">ranlib</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="size-1"></a> +<h2 class="chapter">6 size</h2> + +<a name="index-size"></a> +<a name="index-section-sizes"></a> + + +<div class="smallexample"> +<pre class="smallexample">size [<samp>-A</samp>|<samp>-B</samp>|<samp>-G</samp>|<samp>--format=</samp><var>compatibility</var>] + [<samp>--help</samp>] + [<samp>-d</samp>|<samp>-o</samp>|<samp>-x</samp>|<samp>--radix=</samp><var>number</var>] + [<samp>--common</samp>] + [<samp>-t</samp>|<samp>--totals</samp>] + [<samp>--target=</samp><var>bfdname</var>] [<samp>-V</samp>|<samp>--version</samp>] + [<samp>-f</samp>] + [<var>objfile</var>…] +</pre></div> + + +<p>The <small>GNU</small> <code>size</code> utility lists the section sizes and the total +size for each of the binary files <var>objfile</var> on its argument list. +By default, one line of output is generated for each file or each +module if the file is an archive. +</p> +<p><var>objfile</var>… are the files to be examined. If none are +specified, the file <code>a.out</code> will be used instead. +</p> + + +<p>The command-line options have the following meanings: +</p> +<dl compact="compact"> +<dt><code>-A</code></dt> +<dt><code>-B</code></dt> +<dt><code>-G</code></dt> +<dt><code>--format=<var>compatibility</var></code></dt> +<dd><a name="index-size-display-format"></a> +<p>Using one of these options, you can choose whether the output from <small>GNU</small> +<code>size</code> resembles output from System V <code>size</code> (using <samp>-A</samp>, +or <samp>--format=sysv</samp>), or Berkeley <code>size</code> (using <samp>-B</samp>, or +<samp>--format=berkeley</samp>). The default is the one-line format similar to +Berkeley’s. Alternatively, you can choose the GNU format output +(using <samp>-G</samp>, or <samp>--format=gnu</samp>), this is similar to +Berkeley’s output format, but sizes are counted differently. +</p> +<p>Here is an example of the Berkeley (default) format of output from +<code>size</code>: +</p><div class="smallexample"> +<pre class="smallexample">$ size --format=Berkeley ranlib size + text data bss dec hex filename + 294880 81920 11592 388392 5ed28 ranlib + 294880 81920 11888 388688 5ee50 size +</pre></div> + +<p>The Berkeley style output counts read only data in the <code>text</code> +column, not in the <code>data</code> column, the <code>dec</code> and <code>hex</code> +columns both display the sum of the <code>text</code>, <code>data</code>, and +<code>bss</code> columns in decimal and hexadecimal respectively. +</p> +<p>The GNU format counts read only data in the <code>data</code> column, not +the <code>text</code> column, and only displays the sum of the <code>text</code>, +<code>data</code>, and <code>bss</code> columns once, in the <code>total</code> column. +The <samp>--radix</samp> option can be used to change the number base for +all columns. Here is the same data displayed with GNU conventions: +</p> +<div class="smallexample"> +<pre class="smallexample">$ size --format=GNU ranlib size + text data bss total filename + 279880 96920 11592 388392 ranlib + 279880 96920 11888 388688 size +</pre></div> + +<p>This is the same data, but displayed closer to System V conventions: +</p> +<div class="smallexample"> +<pre class="smallexample">$ size --format=SysV ranlib size +ranlib : +section size addr +.text 294880 8192 +.data 81920 303104 +.bss 11592 385024 +Total 388392 + + +size : +section size addr +.text 294880 8192 +.data 81920 303104 +.bss 11888 385024 +Total 388688 +</pre></div> + +</dd> +<dt><code>--help</code></dt> +<dt><code>-h</code></dt> +<dt><code>-H</code></dt> +<dt><code>-?</code></dt> +<dd><p>Show a summary of acceptable arguments and options. +</p> +</dd> +<dt><code>-d</code></dt> +<dt><code>-o</code></dt> +<dt><code>-x</code></dt> +<dt><code>--radix=<var>number</var></code></dt> +<dd><a name="index-size-number-format"></a> +<a name="index-radix-for-section-sizes"></a> +<p>Using one of these options, you can control whether the size of each +section is given in decimal (<samp>-d</samp>, or <samp>--radix=10</samp>); octal +(<samp>-o</samp>, or <samp>--radix=8</samp>); or hexadecimal (<samp>-x</samp>, or +<samp>--radix=16</samp>). In <samp>--radix=<var>number</var></samp>, only the three +values (8, 10, 16) are supported. The total size is always given in two +radices; decimal and hexadecimal for <samp>-d</samp> or <samp>-x</samp> output, or +octal and hexadecimal if you’re using <samp>-o</samp>. +</p> +</dd> +<dt><code>--common</code></dt> +<dd><p>Print total size of common symbols in each file. When using Berkeley +or GNU format these are included in the bss size. +</p> +</dd> +<dt><code>-t</code></dt> +<dt><code>--totals</code></dt> +<dd><p>Show totals of all objects listed (Berkeley or GNU format mode only). +</p> +</dd> +<dt><code>--target=<var>bfdname</var></code></dt> +<dd><a name="index-object-code-format-2"></a> +<p>Specify that the object-code format for <var>objfile</var> is +<var>bfdname</var>. This option may not be necessary; <code>size</code> can +automatically recognize many formats. +See <a href="#Target-Selection">Target Selection</a>, for more information. +</p> +</dd> +<dt><code>-v</code></dt> +<dt><code>-V</code></dt> +<dt><code>--version</code></dt> +<dd><p>Display the version number of <code>size</code>. +</p> +</dd> +<dt><code>-f</code></dt> +<dd><p>Ignored. This option is used by other versions of the <code>size</code> +program, but it is not supported by the GNU Binutils version. +</p> +</dd> +</dl> + + + +<hr> +<a name="strings"></a> +<div class="header"> +<p> +Next: <a href="#strip" accesskey="n" rel="next">strip</a>, Previous: <a href="#size" accesskey="p" rel="previous">size</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="strings-1"></a> +<h2 class="chapter">7 strings</h2> +<a name="index-strings"></a> +<a name="index-listings-strings"></a> +<a name="index-printing-strings"></a> +<a name="index-strings_002c-printing"></a> + + +<div class="smallexample"> +<pre class="smallexample">strings [<samp>-afovV</samp>] [<samp>-</samp><var>min-len</var>] + [<samp>-n</samp> <var>min-len</var>] [<samp>--bytes=</samp><var>min-len</var>] + [<samp>-t</samp> <var>radix</var>] [<samp>--radix=</samp><var>radix</var>] + [<samp>-e</samp> <var>encoding</var>] [<samp>--encoding=</samp><var>encoding</var>] + [<samp>-U</samp> <var>method</var>] [<samp>--unicode=</samp><var>method</var>] + [<samp>-</samp>] [<samp>--all</samp>] [<samp>--print-file-name</samp>] + [<samp>-T</samp> <var>bfdname</var>] [<samp>--target=</samp><var>bfdname</var>] + [<samp>-w</samp>] [<samp>--include-all-whitespace</samp>] + [<samp>-s</samp>] [<samp>--output-separator</samp> <var>sep_string</var>] + [<samp>--help</samp>] [<samp>--version</samp>] <var>file</var>… +</pre></div> + + +<p>For each <var>file</var> given, <small>GNU</small> <code>strings</code> prints the +printable character sequences that are at least 4 characters long (or +the number given with the options below) and are followed by an +unprintable character. +</p> +<p>Depending upon how the strings program was configured it will default +to either displaying all the printable sequences that it can find in +each file, or only those sequences that are in loadable, initialized +data sections. If the file type is unrecognizable, or if strings is +reading from stdin then it will always display all of the printable +sequences that it can find. +</p> +<p>For backwards compatibility any file that occurs after a command-line +option of just <samp>-</samp> will also be scanned in full, regardless of +the presence of any <samp>-d</samp> option. +</p> +<p><code>strings</code> is mainly useful for determining the contents of +non-text files. +</p> + + +<dl compact="compact"> +<dt><code>-a</code></dt> +<dt><code>--all</code></dt> +<dt><code>-</code></dt> +<dd><p>Scan the whole file, regardless of what sections it contains or +whether those sections are loaded or initialized. Normally this is +the default behaviour, but strings can be configured so that the +<samp>-d</samp> is the default instead. +</p> +<p>The <samp>-</samp> option is position dependent and forces strings to +perform full scans of any file that is mentioned after the <samp>-</samp> +on the command line, even if the <samp>-d</samp> option has been +specified. +</p> +</dd> +<dt><code>-d</code></dt> +<dt><code>--data</code></dt> +<dd><p>Only print strings from initialized, loaded data sections in the +file. This may reduce the amount of garbage in the output, but it +also exposes the strings program to any security flaws that may be +present in the BFD library used to scan and load sections. Strings +can be configured so that this option is the default behaviour. In +such cases the <samp>-a</samp> option can be used to avoid using the BFD +library and instead just print all of the strings found in the file. +</p> +</dd> +<dt><code>-f</code></dt> +<dt><code>--print-file-name</code></dt> +<dd><p>Print the name of the file before each string. +</p> +</dd> +<dt><code>--help</code></dt> +<dd><p>Print a summary of the program usage on the standard output and exit. +</p> +</dd> +<dt><code>-<var>min-len</var></code></dt> +<dt><code>-n <var>min-len</var></code></dt> +<dt><code>--bytes=<var>min-len</var></code></dt> +<dd><p>Print sequences of displayable characters that are at least +<var>min-len</var> 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 +<samp>-e</samp> and <samp>-U</samp> options. Sequences are always terminated +at control characters such as new-line and carriage-return, but not +the tab character. +</p> +</dd> +<dt><code>-o</code></dt> +<dd><p>Like ‘<samp>-t o</samp>’. Some other versions of <code>strings</code> have <samp>-o</samp> +act like ‘<samp>-t d</samp>’ instead. Since we can not be compatible with both +ways, we simply chose one. +</p> +</dd> +<dt><code>-t <var>radix</var></code></dt> +<dt><code>--radix=<var>radix</var></code></dt> +<dd><p>Print the offset within the file before each string. The single +character argument specifies the radix of the offset—‘<samp>o</samp>’ for +octal, ‘<samp>x</samp>’ for hexadecimal, or ‘<samp>d</samp>’ for decimal. +</p> +</dd> +<dt><code>-e <var>encoding</var></code></dt> +<dt><code>--encoding=<var>encoding</var></code></dt> +<dd><p>Select the character encoding of the strings that are to be found. +Possible values for <var>encoding</var> are: ‘<samp>s</samp>’ = single-7-bit-byte +characters (default), ‘<samp>S</samp>’ = +single-8-bit-byte characters, ‘<samp>b</samp>’ = 16-bit bigendian, ‘<samp>l</samp>’ = +16-bit littleendian, ‘<samp>B</samp>’ = 32-bit bigendian, ‘<samp>L</samp>’ = 32-bit +littleendian. Useful for finding wide character strings. (‘<samp>l</samp>’ +and ‘<samp>b</samp>’ apply to, for example, Unicode UTF-16/UCS-2 encodings). +</p> +</dd> +<dt><code>-U <var>[d|i|l|e|x|h]</var></code></dt> +<dt><code>--unicode=<var>[default|invalid|locale|escape|hex|highlight]</var></code></dt> +<dd><p>Controls the display of UTF-8 encoded multibyte characters in strings. +The default (<samp>--unicode=default</samp>) is to give them no special +treatment, and instead rely upon the setting of the +<samp>--encoding</samp> option. The other values for this option +automatically enable <samp>--encoding=S</samp>. +</p> +<p>The <samp>--unicode=invalid</samp> 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. +</p> +<p>The <samp>--unicode=locale</samp> option displays them in the current +locale, which may or may not support UTF-8 encoding. The +<samp>--unicode=hex</samp> option displays them as hex byte sequences +enclosed between <var><></var> characters. The <samp>--unicode=escape</samp> +option displays them as escape sequences (<var>\uxxxx</var>) and the +<samp>--unicode=highlight</samp> 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. +</p> +</dd> +<dt><code>-T <var>bfdname</var></code></dt> +<dt><code>--target=<var>bfdname</var></code></dt> +<dd><a name="index-object-code-format-3"></a> +<p>Specify an object code format other than your system’s default format. +See <a href="#Target-Selection">Target Selection</a>, for more information. +</p> +</dd> +<dt><code>-v</code></dt> +<dt><code>-V</code></dt> +<dt><code>--version</code></dt> +<dd><p>Print the program version number on the standard output and exit. +</p> +</dd> +<dt><code>-w</code></dt> +<dt><code>--include-all-whitespace</code></dt> +<dd><p>By default tab and space characters are included in the strings that +are displayed, but other whitespace characters, such a newlines and +carriage returns, are not. The <samp>-w</samp> option changes this so +that all whitespace characters are considered to be part of a string. +</p> +</dd> +<dt><code>-s</code></dt> +<dt><code>--output-separator</code></dt> +<dd><p>By default, output strings are delimited by a new-line. This option +allows you to supply any string to be used as the output record +separator. Useful with –include-all-whitespace where strings +may contain new-lines internally. +</p></dd> +</dl> + + + +<hr> +<a name="strip"></a> +<div class="header"> +<p> +Next: <a href="#c_002b_002bfilt" accesskey="n" rel="next">c++filt</a>, Previous: <a href="#strings" accesskey="p" rel="previous">strings</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="strip-1"></a> +<h2 class="chapter">8 strip</h2> + +<a name="index-strip"></a> +<a name="index-removing-symbols"></a> +<a name="index-discarding-symbols"></a> +<a name="index-symbols_002c-discarding"></a> + + +<div class="smallexample"> +<pre class="smallexample">strip [<samp>-F</samp> <var>bfdname</var> |<samp>--target=</samp><var>bfdname</var>] + [<samp>-I</samp> <var>bfdname</var> |<samp>--input-target=</samp><var>bfdname</var>] + [<samp>-O</samp> <var>bfdname</var> |<samp>--output-target=</samp><var>bfdname</var>] + [<samp>-s</samp>|<samp>--strip-all</samp>] + [<samp>-S</samp>|<samp>-g</samp>|<samp>-d</samp>|<samp>--strip-debug</samp>] + [<samp>--strip-dwo</samp>] + [<samp>-K</samp> <var>symbolname</var>|<samp>--keep-symbol=</samp><var>symbolname</var>] + [<samp>-M</samp>|<samp>--merge-notes</samp>][<samp>--no-merge-notes</samp>] + [<samp>-N</samp> <var>symbolname</var> |<samp>--strip-symbol=</samp><var>symbolname</var>] + [<samp>-w</samp>|<samp>--wildcard</samp>] + [<samp>-x</samp>|<samp>--discard-all</samp>] [<samp>-X</samp> |<samp>--discard-locals</samp>] + [<samp>-R</samp> <var>sectionname</var> |<samp>--remove-section=</samp><var>sectionname</var>] + [<samp>--keep-section=</samp><var>sectionpattern</var>] + [<samp>--remove-relocations=</samp><var>sectionpattern</var>] + [<samp>--strip-section-headers</samp>] + [<samp>-o</samp> <var>file</var>] [<samp>-p</samp>|<samp>--preserve-dates</samp>] + [<samp>-D</samp>|<samp>--enable-deterministic-archives</samp>] + [<samp>-U</samp>|<samp>--disable-deterministic-archives</samp>] + [<samp>--keep-section-symbols</samp>] + [<samp>--keep-file-symbols</samp>] + [<samp>--only-keep-debug</samp>] + [<samp>-v</samp> |<samp>--verbose</samp>] [<samp>-V</samp>|<samp>--version</samp>] + [<samp>--help</samp>] [<samp>--info</samp>] + <var>objfile</var>… +</pre></div> + + +<p><small>GNU</small> <code>strip</code> discards all symbols from object files +<var>objfile</var>. The list of object files may include archives. +At least one object file must be given. +</p> +<p><code>strip</code> modifies the files named in its argument, +rather than writing modified copies under different names. +</p> + + +<dl compact="compact"> +<dt><code>-F <var>bfdname</var></code></dt> +<dt><code>--target=<var>bfdname</var></code></dt> +<dd><p>Treat the original <var>objfile</var> as a file with the object +code format <var>bfdname</var>, and rewrite it in the same format. +See <a href="#Target-Selection">Target Selection</a>, for more information. +</p> +</dd> +<dt><code>--help</code></dt> +<dd><p>Show a summary of the options to <code>strip</code> and exit. +</p> +</dd> +<dt><code>--info</code></dt> +<dd><p>Display a list showing all architectures and object formats available. +</p> +</dd> +<dt><code>-I <var>bfdname</var></code></dt> +<dt><code>--input-target=<var>bfdname</var></code></dt> +<dd><p>Treat the original <var>objfile</var> as a file with the object +code format <var>bfdname</var>. +See <a href="#Target-Selection">Target Selection</a>, for more information. +</p> +</dd> +<dt><code>-O <var>bfdname</var></code></dt> +<dt><code>--output-target=<var>bfdname</var></code></dt> +<dd><p>Replace <var>objfile</var> with a file in the output format <var>bfdname</var>. +See <a href="#Target-Selection">Target Selection</a>, for more information. +</p> +</dd> +<dt><code>-R <var>sectionname</var></code></dt> +<dt><code>--remove-section=<var>sectionname</var></code></dt> +<dd><p>Remove any section named <var>sectionname</var> from the output file, in +addition to whatever sections would otherwise be removed. This +option may be given more than once. Note that using this option +inappropriately may make the output file unusable. The wildcard +character ‘<samp>*</samp>’ may be given at the end of <var>sectionname</var>. If +so, then any section starting with <var>sectionname</var> will be removed. +</p> +<p>If the first character of <var>sectionpattern</var> is the exclamation +point (!) then matching sections will not be removed even if an +earlier use of <samp>--remove-section</samp> on the same command line +would otherwise remove it. For example: +</p> +<div class="smallexample"> +<pre class="smallexample"> --remove-section=.text.* --remove-section=!.text.foo +</pre></div> + +<p>will remove all sections matching the pattern ’.text.*’, but will not +remove the section ’.text.foo’. +</p> +</dd> +<dt><code>--keep-section=<var>sectionpattern</var></code></dt> +<dd><p>When removing sections from the output file, keep sections that match +<var>sectionpattern</var>. +</p> +</dd> +<dt><code>--remove-relocations=<var>sectionpattern</var></code></dt> +<dd><p>Remove relocations from the output file for any section matching +<var>sectionpattern</var>. This option may be given more than once. Note +that using this option inappropriately may make the output file +unusable. Wildcard characters are accepted in <var>sectionpattern</var>. +For example: +</p> +<div class="smallexample"> +<pre class="smallexample"> --remove-relocations=.text.* +</pre></div> + +<p>will remove the relocations for all sections matching the patter +’.text.*’. +</p> +<p>If the first character of <var>sectionpattern</var> is the exclamation +point (!) then matching sections will not have their relocation +removed even if an earlier use of <samp>--remove-relocations</samp> on the +same command line would otherwise cause the relocations to be removed. +For example: +</p> +<div class="smallexample"> +<pre class="smallexample"> --remove-relocations=.text.* --remove-relocations=!.text.foo +</pre></div> + +<p>will remove all relocations for sections matching the pattern +’.text.*’, but will not remove relocations for the section +’.text.foo’. +</p> +</dd> +<dt><code>--strip-section-headers</code></dt> +<dd><p>Strip section headers. This option is specific to ELF files. Implies +<samp>--strip-all</samp> and <samp>--merge-notes</samp>. +</p> +</dd> +<dt><code>-s</code></dt> +<dt><code>--strip-all</code></dt> +<dd><p>Remove all symbols. +</p> +</dd> +<dt><code>-g</code></dt> +<dt><code>-S</code></dt> +<dt><code>-d</code></dt> +<dt><code>--strip-debug</code></dt> +<dd><p>Remove debugging symbols only. +</p> +</dd> +<dt><code>--strip-dwo</code></dt> +<dd><p>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 <code>objcopy</code> section +for more information. +</p> +</dd> +<dt><code>--strip-unneeded</code></dt> +<dd><p>Remove all symbols that are not needed for relocation processing in +addition to debugging symbols and sections stripped by +<samp>--strip-debug</samp>. +</p> +</dd> +<dt><code>-K <var>symbolname</var></code></dt> +<dt><code>--keep-symbol=<var>symbolname</var></code></dt> +<dd><p>When stripping symbols, keep symbol <var>symbolname</var> even if it would +normally be stripped. This option may be given more than once. +</p> +</dd> +<dt><code>-M</code></dt> +<dt><code>--merge-notes</code></dt> +<dt><code>--no-merge-notes</code></dt> +<dd><p>For ELF files, attempt (or do not attempt) to reduce the size of any +SHT_NOTE type sections by removing duplicate notes. The default is to +attempt this reduction unless stripping debug or DWO information. +</p> +</dd> +<dt><code>-N <var>symbolname</var></code></dt> +<dt><code>--strip-symbol=<var>symbolname</var></code></dt> +<dd><p>Remove symbol <var>symbolname</var> from the source file. This option may be +given more than once, and may be combined with strip options other than +<samp>-K</samp>. +</p> +</dd> +<dt><code>-o <var>file</var></code></dt> +<dd><p>Put the stripped output in <var>file</var>, rather than replacing the +existing file. When this argument is used, only one <var>objfile</var> +argument may be specified. +</p> +</dd> +<dt><code>-p</code></dt> +<dt><code>--preserve-dates</code></dt> +<dd><p>Preserve the access and modification dates of the file. +</p> +</dd> +<dt><code>-D</code></dt> +<dt><code>--enable-deterministic-archives</code></dt> +<dd><a name="index-deterministic-archives-6"></a> +<a name="index-_002d_002denable_002ddeterministic_002darchives-6"></a> +<p>Operate in <em>deterministic</em> mode. When copying archive members +and writing the archive index, use zero for UIDs, GIDs, timestamps, +and use consistent file modes for all files. +</p> +<p>If <samp>binutils</samp> was configured with +<samp>--enable-deterministic-archives</samp>, then this mode is on by default. +It can be disabled with the ‘<samp>-U</samp>’ option, below. +</p> +</dd> +<dt><code>-U</code></dt> +<dt><code>--disable-deterministic-archives</code></dt> +<dd><a name="index-deterministic-archives-7"></a> +<a name="index-_002d_002denable_002ddeterministic_002darchives-7"></a> +<p>Do <em>not</em> operate in <em>deterministic</em> mode. This is the +inverse of the <samp>-D</samp> option, above: when copying archive members +and writing the archive index, use their actual UID, GID, timestamp, +and file mode values. +</p> +<p>This is the default unless <samp>binutils</samp> was configured with +<samp>--enable-deterministic-archives</samp>. +</p> +</dd> +<dt><code>-w</code></dt> +<dt><code>--wildcard</code></dt> +<dd><p>Permit regular expressions in <var>symbolname</var>s used in other command +line options. The question mark (?), asterisk (*), backslash (\) and +square brackets ([]) operators can be used anywhere in the symbol +name. If the first character of the symbol name is the exclamation +point (!) then the sense of the switch is reversed for that symbol. +For example: +</p> +<div class="smallexample"> +<pre class="smallexample"> -w -K !foo -K fo* +</pre></div> + +<p>would cause strip to only keep symbols that start with the letters +“fo”, but to discard the symbol “foo”. +</p> +</dd> +<dt><code>-x</code></dt> +<dt><code>--discard-all</code></dt> +<dd><p>Remove non-global symbols. +</p> +</dd> +<dt><code>-X</code></dt> +<dt><code>--discard-locals</code></dt> +<dd><p>Remove compiler-generated local symbols. +(These usually start with ‘<samp>L</samp>’ or ‘<samp>.</samp>’.) +</p> +</dd> +<dt><code>--keep-section-symbols</code></dt> +<dd><p>When stripping a file, perhaps with <samp>--strip-debug</samp> or +<samp>--strip-unneeded</samp>, retain any symbols specifying section names, +which would otherwise get stripped. +</p> +</dd> +<dt><code>--keep-file-symbols</code></dt> +<dd><p>When stripping a file, perhaps with <samp>--strip-debug</samp> or +<samp>--strip-unneeded</samp>, retain any symbols specifying source file names, +which would otherwise get stripped. +</p> +</dd> +<dt><code>--only-keep-debug</code></dt> +<dd><p>Strip a file, emptying the contents of any sections that would not be +stripped by <samp>--strip-debug</samp> and leaving the debugging sections +intact. In ELF files, this preserves all the note sections in the +output as well. +</p> +<p>Note - the section headers of the stripped sections are preserved, +including their sizes, but the contents of the section are discarded. +The section headers are preserved so that other tools can match up the +debuginfo file with the real executable, even if that executable has +been relocated to a different address space. +</p> +<p>The intention is that this option will be used in conjunction with +<samp>--add-gnu-debuglink</samp> to create a two part executable. One a +stripped binary which will occupy less space in RAM and in a +distribution and the second a debugging information file which is only +needed if debugging abilities are required. The suggested procedure +to create these files is as follows: +</p> +<ol> +<li> Link the executable as normal. Assuming that it is called +<code>foo</code> then... +</li><li> Run <code>objcopy --only-keep-debug foo foo.dbg</code> to +create a file containing the debugging info. +</li><li> Run <code>objcopy --strip-debug foo</code> to create a +stripped executable. +</li><li> Run <code>objcopy --add-gnu-debuglink=foo.dbg foo</code> +to add a link to the debugging info into the stripped executable. +</li></ol> + +<p>Note—the choice of <code>.dbg</code> as an extension for the debug info +file is arbitrary. Also the <code>--only-keep-debug</code> step is +optional. You could instead do this: +</p> +<ol> +<li> Link the executable as normal. +</li><li> Copy <code>foo</code> to <code>foo.full</code> +</li><li> Run <code>strip --strip-debug foo</code> +</li><li> Run <code>objcopy --add-gnu-debuglink=foo.full foo</code> +</li></ol> + +<p>i.e., the file pointed to by the <samp>--add-gnu-debuglink</samp> can be the +full executable. It does not have to be a file created by the +<samp>--only-keep-debug</samp> switch. +</p> +<p>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. +</p> +</dd> +<dt><code>-V</code></dt> +<dt><code>--version</code></dt> +<dd><p>Show the version number for <code>strip</code>. +</p> +</dd> +<dt><code>-v</code></dt> +<dt><code>--verbose</code></dt> +<dd><p>Verbose output: list all object files modified. In the case of +archives, ‘<samp>strip -v</samp>’ lists all members of the archive. +</p></dd> +</dl> + + + +<hr> +<a name="c_002b_002bfilt"></a> +<div class="header"> +<p> +Next: <a href="#addr2line" accesskey="n" rel="next">addr2line</a>, Previous: <a href="#strip" accesskey="p" rel="previous">strip</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="c_002b_002bfilt-1"></a> +<h2 class="chapter">9 c++filt</h2> + +<a name="index-c_002b_002bfilt"></a> +<a name="index-demangling-C_002b_002b-symbols"></a> + + +<div class="smallexample"> +<pre class="smallexample">c++filt [<samp>-_</samp>|<samp>--strip-underscore</samp>] + [<samp>-n</samp>|<samp>--no-strip-underscore</samp>] + [<samp>-p</samp>|<samp>--no-params</samp>] + [<samp>-t</samp>|<samp>--types</samp>] + [<samp>-i</samp>|<samp>--no-verbose</samp>] + [<samp>-r</samp>|<samp>--no-recurse-limit</samp>] + [<samp>-R</samp>|<samp>--recurse-limit</samp>] + [<samp>-s</samp> <var>format</var>|<samp>--format=</samp><var>format</var>] + [<samp>--help</samp>] [<samp>--version</samp>] [<var>symbol</var>…] +</pre></div> + + +<a name="index-cxxfilt"></a> +<p>The C++ and Java languages provide function overloading, which means +that you can write many functions with the same name, providing that +each function takes parameters of different types. In order to be +able to distinguish these similarly named functions C++ and Java +encode them into a low-level assembler name which uniquely identifies +each different version. This process is known as <em>mangling</em>. The +<code>c++filt</code> +<a name="DOCF1" href="#FOOT1"><sup>1</sup></a> +program does the inverse mapping: it decodes (<em>demangles</em>) low-level +names into user-level names so that they can be read. +</p> +<p>Every alphanumeric word (consisting of letters, digits, underscores, +dollars, or periods) seen in the input is a potential mangled name. +If the name decodes into a C++ name, the C++ name replaces the +low-level name in the output, otherwise the original word is output. +In this way you can pass an entire assembler source file, containing +mangled names, through <code>c++filt</code> and see the same source file +containing demangled names. +</p> +<p>You can also use <code>c++filt</code> to decipher individual symbols by +passing them on the command line: +</p> +<div class="example"> +<pre class="example">c++filt <var>symbol</var> +</pre></div> + +<p>If no <var>symbol</var> arguments are given, <code>c++filt</code> reads symbol +names from the standard input instead. All the results are printed on +the standard output. The difference between reading names from the +command line versus reading names from the standard input is that +command-line arguments are expected to be just mangled names and no +checking is performed to separate them from surrounding text. Thus +for example: +</p> +<div class="smallexample"> +<pre class="smallexample">c++filt -n _Z1fv +</pre></div> + +<p>will work and demangle the name to “f()” whereas: +</p> +<div class="smallexample"> +<pre class="smallexample">c++filt -n _Z1fv, +</pre></div> + +<p>will not work. (Note the extra comma at the end of the mangled +name which makes it invalid). This command however will work: +</p> +<div class="smallexample"> +<pre class="smallexample">echo _Z1fv, | c++filt -n +</pre></div> + +<p>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. For example: +</p> +<div class="smallexample"> +<pre class="smallexample"> .type _Z1fv, @function +</pre></div> + + + +<dl compact="compact"> +<dt><code>-_</code></dt> +<dt><code>--strip-underscore</code></dt> +<dd><p>On some systems, both the C and C++ compilers put an underscore in front +of every name. For example, the C name <code>foo</code> gets the low-level +name <code>_foo</code>. This option removes the initial underscore. Whether +<code>c++filt</code> removes the underscore by default is target dependent. +</p> +</dd> +<dt><code>-n</code></dt> +<dt><code>--no-strip-underscore</code></dt> +<dd><p>Do not remove the initial underscore. +</p> +</dd> +<dt><code>-p</code></dt> +<dt><code>--no-params</code></dt> +<dd><p>When demangling the name of a function, do not display the types of +the function’s parameters. +</p> +</dd> +<dt><code>-t</code></dt> +<dt><code>--types</code></dt> +<dd><p>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. For example, +a function called “a” treated as a mangled type name would be +demangled to “signed char”. +</p> +</dd> +<dt><code>-i</code></dt> +<dt><code>--no-verbose</code></dt> +<dd><p>Do not include implementation details (if any) in the demangled +output. +</p> +</dd> +<dt><code>-r</code></dt> +<dt><code>-R</code></dt> +<dt><code>--recurse-limit</code></dt> +<dt><code>--no-recurse-limit</code></dt> +<dt><code>--recursion-limit</code></dt> +<dt><code>--no-recursion-limit</code></dt> +<dd><p>Enables or disables a limit on the amount of recursion performed +whilst demangling strings. Since the name mangling formats allow for +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. +</p> +<p>The default is for this limit to be enabled, but disabling it may be +necessary in order to demangle truly complicated names. Note however +that if the recursion limit is disabled then stack exhaustion is +possible and any bug reports about such an event will be rejected. +</p> +<p>The <samp>-r</samp> option is a synonym for the +<samp>--no-recurse-limit</samp> option. The <samp>-R</samp> option is a +synonym for the <samp>--recurse-limit</samp> option. +</p> +</dd> +<dt><code>-s <var>format</var></code></dt> +<dt><code>--format=<var>format</var></code></dt> +<dd><p><code>c++filt</code> can decode various methods of mangling, used by +different compilers. The argument to this option selects which +method it uses: +</p> +<dl compact="compact"> +<dt><code>auto</code></dt> +<dd><p>Automatic selection based on executable (the default method) +</p></dd> +<dt><code>gnu</code></dt> +<dd><p>the one used by the <small>GNU</small> C++ compiler (g++) +</p></dd> +<dt><code>lucid</code></dt> +<dd><p>the one used by the Lucid compiler (lcc) +</p></dd> +<dt><code>arm</code></dt> +<dd><p>the one specified by the C++ Annotated Reference Manual +</p></dd> +<dt><code>hp</code></dt> +<dd><p>the one used by the HP compiler (aCC) +</p></dd> +<dt><code>edg</code></dt> +<dd><p>the one used by the EDG compiler +</p></dd> +<dt><code>gnu-v3</code></dt> +<dd><p>the one used by the <small>GNU</small> C++ compiler (g++) with the V3 ABI. +</p></dd> +<dt><code>java</code></dt> +<dd><p>the one used by the <small>GNU</small> Java compiler (gcj) +</p></dd> +<dt><code>gnat</code></dt> +<dd><p>the one used by the <small>GNU</small> Ada compiler (GNAT). +</p></dd> +</dl> + +</dd> +<dt><code>--help</code></dt> +<dd><p>Print a summary of the options to <code>c++filt</code> and exit. +</p> +</dd> +<dt><code>--version</code></dt> +<dd><p>Print the version number of <code>c++filt</code> and exit. +</p></dd> +</dl> + + + +<blockquote> +<p><em>Warning:</em> <code>c++filt</code> is a new utility, and the details of its +user interface are subject to change in future releases. In particular, +a command-line option may be required in the future to decode a name +passed as an argument on the command line; in other words, +</p> +<div class="example"> +<pre class="example">c++filt <var>symbol</var> +</pre></div> + +<p>may in a future release become +</p> +<div class="example"> +<pre class="example">c++filt <var>option</var> <var>symbol</var> +</pre></div> +</blockquote> + +<hr> +<a name="addr2line"></a> +<div class="header"> +<p> +Next: <a href="#windmc" accesskey="n" rel="next">windmc</a>, Previous: <a href="#c_002b_002bfilt" accesskey="p" rel="previous">c++filt</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="addr2line-1"></a> +<h2 class="chapter">10 addr2line</h2> + +<a name="index-addr2line"></a> +<a name="index-address-to-file-name-and-line-number"></a> + + +<div class="smallexample"> +<pre class="smallexample">addr2line [<samp>-a</samp>|<samp>--addresses</samp>] + [<samp>-b</samp> <var>bfdname</var>|<samp>--target=</samp><var>bfdname</var>] + [<samp>-C</samp>|<samp>--demangle</samp>[=<var>style</var>]] + [<samp>-r</samp>|<samp>--no-recurse-limit</samp>] + [<samp>-R</samp>|<samp>--recurse-limit</samp>] + [<samp>-e</samp> <var>filename</var>|<samp>--exe=</samp><var>filename</var>] + [<samp>-f</samp>|<samp>--functions</samp>] [<samp>-s</samp>|<samp>--basename</samp>] + [<samp>-i</samp>|<samp>--inlines</samp>] + [<samp>-p</samp>|<samp>--pretty-print</samp>] + [<samp>-j</samp>|<samp>--section=</samp><var>name</var>] + [<samp>-H</samp>|<samp>--help</samp>] [<samp>-V</samp>|<samp>--version</samp>] + [addr addr …] +</pre></div> + + +<p><code>addr2line</code> 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. +</p> +<p>The executable or relocatable object to use is specified with the <samp>-e</samp> +option. The default is the file <samp>a.out</samp>. The section in the relocatable +object to use is specified with the <samp>-j</samp> option. +</p> +<p><code>addr2line</code> has two modes of operation. +</p> +<p>In the first, hexadecimal addresses or symbol+offset are specified on the command line, +and <code>addr2line</code> displays the file name and line number for each +address. +</p> +<p>In the second, <code>addr2line</code> 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, <code>addr2line</code> may be used +in a pipe to convert dynamically chosen addresses. +</p> +<p>The format of the output is ‘<samp>FILENAME:LINENO</samp>’. By default +each input address generates one line of output. +</p> +<p>Two options can generate additional lines before each +‘<samp>FILENAME:LINENO</samp>’ line (in that order). +</p> +<p>If the <samp>-a</samp> option is used then a line with the input address +is displayed. +</p> +<p>If the <samp>-f</samp> option is used, then a line with the +‘<samp>FUNCTIONNAME</samp>’ is displayed. This is the name of the function +containing the address. +</p> +<p>One option can generate additional lines after the +‘<samp>FILENAME:LINENO</samp>’ line. +</p> +<p>If the <samp>-i</samp> option is used and the code at the given address is +present there because of inlining by the compiler then additional +lines are displayed afterwards. One or two extra lines (if the +<samp>-f</samp> option is used) are displayed for each inlined function. +</p> +<p>Alternatively if the <samp>-p</samp> option is used then each input +address generates a single, long, output line containing the address, +the function name, the file name and the line number. If the +<samp>-i</samp> option has also been used then any inlined functions will +be displayed in the same manner, but on separate lines, and prefixed +by the text ‘<samp>(inlined by)</samp>’. +</p> +<p>If the file name or function name can not be determined, +<code>addr2line</code> will print two question marks in their place. If the +line number can not be determined, <code>addr2line</code> will print 0. +</p> +<p>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. +</p> + + +<p>The long and short forms of options, shown here as alternatives, are +equivalent. +</p> +<dl compact="compact"> +<dt><code>-a</code></dt> +<dt><code>--addresses</code></dt> +<dd><p>Display the address before the function name, file and line number +information. The address is printed with a ‘<samp>0x</samp>’ prefix to easily +identify it. +</p> +</dd> +<dt><code>-b <var>bfdname</var></code></dt> +<dt><code>--target=<var>bfdname</var></code></dt> +<dd><a name="index-object-code-format-4"></a> +<p>Specify that the object-code format for the object files is +<var>bfdname</var>. +</p> +</dd> +<dt><code>-C</code></dt> +<dt><code>--demangle[=<var>style</var>]</code></dt> +<dd><a name="index-demangling-in-objdump-1"></a> +<p>Decode (<em>demangle</em>) low-level symbol names into user-level names. +Besides removing any initial underscore prepended by the system, this +makes C++ function names readable. Different compilers have different +mangling styles. The optional demangling style argument can be used to +choose an appropriate demangling style for your compiler. See <a href="#c_002b_002bfilt">c++filt</a>, +for more information on demangling. +</p> +</dd> +<dt><code>-e <var>filename</var></code></dt> +<dt><code>--exe=<var>filename</var></code></dt> +<dd><p>Specify the name of the executable for which addresses should be +translated. The default file is <samp>a.out</samp>. +</p> +</dd> +<dt><code>-f</code></dt> +<dt><code>--functions</code></dt> +<dd><p>Display function names as well as file and line number information. +</p> +</dd> +<dt><code>-s</code></dt> +<dt><code>--basenames</code></dt> +<dd><p>Display only the base of each file name. +</p> +</dd> +<dt><code>-i</code></dt> +<dt><code>--inlines</code></dt> +<dd><p>If the address belongs to a function that was inlined, the source +information for all enclosing scopes back to the first non-inlined +function will also be printed. For example, if <code>main</code> inlines +<code>callee1</code> which inlines <code>callee2</code>, and address is from +<code>callee2</code>, the source information for <code>callee1</code> and <code>main</code> +will also be printed. +</p> +</dd> +<dt><code>-j</code></dt> +<dt><code>--section</code></dt> +<dd><p>Read offsets relative to the specified section instead of absolute addresses. +</p> +</dd> +<dt><code>-p</code></dt> +<dt><code>--pretty-print</code></dt> +<dd><p>Make the output more human friendly: each location are printed on one line. +If option <samp>-i</samp> is specified, lines for all enclosing scopes are +prefixed with ‘<samp>(inlined by)</samp>’. +</p> +</dd> +<dt><code>-r</code></dt> +<dt><code>-R</code></dt> +<dt><code>--recurse-limit</code></dt> +<dt><code>--no-recurse-limit</code></dt> +<dt><code>--recursion-limit</code></dt> +<dt><code>--no-recursion-limit</code></dt> +<dd><p>Enables or disables a limit on the amount of recursion performed +whilst demangling strings. Since the name mangling formats allow for +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. +</p> +<p>The default is for this limit to be enabled, but disabling it may be +necessary in order to demangle truly complicated names. Note however +that if the recursion limit is disabled then stack exhaustion is +possible and any bug reports about such an event will be rejected. +</p> +<p>The <samp>-r</samp> option is a synonym for the +<samp>--no-recurse-limit</samp> option. The <samp>-R</samp> option is a +synonym for the <samp>--recurse-limit</samp> option. +</p> +<p>Note this option is only effective if the <samp>-C</samp> or +<samp>--demangle</samp> option has been enabled. +</p> +</dd> +</dl> + + + +<hr> +<a name="windmc"></a> +<div class="header"> +<p> +Next: <a href="#windres" accesskey="n" rel="next">windres</a>, Previous: <a href="#addr2line" accesskey="p" rel="previous">addr2line</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="windmc-1"></a> +<h2 class="chapter">11 windmc</h2> + +<p><code>windmc</code> may be used to generator Windows message resources. +</p> +<blockquote> +<p><em>Warning:</em> <code>windmc</code> is not always built as part of the binary +utilities, since it is only useful for Windows targets. +</p></blockquote> + + +<div class="smallexample"> +<pre class="smallexample">windmc [options] input-file +</pre></div> + + +<p><code>windmc</code> reads message definitions from an input file (.mc) and +translate them into a set of output files. The output files may be of +four kinds: +</p> +<dl compact="compact"> +<dt><code>h</code></dt> +<dd><p>A C header file containing the message definitions. +</p> +</dd> +<dt><code>rc</code></dt> +<dd><p>A resource file compilable by the <code>windres</code> tool. +</p> +</dd> +<dt><code>bin</code></dt> +<dd><p>One or more binary files containing the resource data for a specific +message language. +</p> +</dd> +<dt><code>dbg</code></dt> +<dd><p>A C include file that maps message id’s to their symbolic name. +</p></dd> +</dl> + +<p>The exact description of these different formats is available in +documentation from Microsoft. +</p> +<p>When <code>windmc</code> converts from the <code>mc</code> format to the <code>bin</code> +format, <code>rc</code>, <code>h</code>, and optional <code>dbg</code> it is acting like the +Windows Message Compiler. +</p> + + +<dl compact="compact"> +<dt><code>-a</code></dt> +<dt><code>--ascii_in</code></dt> +<dd><p>Specifies that the input file specified is ASCII. This is the default +behaviour. +</p> +</dd> +<dt><code>-A</code></dt> +<dt><code>--ascii_out</code></dt> +<dd><p>Specifies that messages in the output <code>bin</code> files should be in ASCII +format. +</p> +</dd> +<dt><code>-b</code></dt> +<dt><code>--binprefix</code></dt> +<dd><p>Specifies that <code>bin</code> filenames should have to be prefixed by the +basename of the source file. +</p> +</dd> +<dt><code>-c</code></dt> +<dt><code>--customflag</code></dt> +<dd><p>Sets the customer bit in all message id’s. +</p> +</dd> +<dt><code>-C <var>codepage</var></code></dt> +<dt><code>--codepage_in <var>codepage</var></code></dt> +<dd><p>Sets the default codepage to be used to convert input file to UTF16. The +default is ocdepage 1252. +</p> +</dd> +<dt><code>-d</code></dt> +<dt><code>--decimal_values</code></dt> +<dd><p>Outputs the constants in the header file in decimal. Default is using +hexadecimal output. +</p> +</dd> +<dt><code>-e <var>ext</var></code></dt> +<dt><code>--extension <var>ext</var></code></dt> +<dd><p>The extension for the header file. The default is .h extension. +</p> +</dd> +<dt><code>-F <var>target</var></code></dt> +<dt><code>--target <var>target</var></code></dt> +<dd><p>Specify the BFD format to use for a bin file as output. This +is a BFD target name; you can use the <samp>--help</samp> option to see a list +of supported targets. Normally <code>windmc</code> will use the default +format, which is the first one listed by the <samp>--help</samp> option. +<a href="#Target-Selection">Target Selection</a>. +</p> +</dd> +<dt><code>-h <var>path</var></code></dt> +<dt><code>--headerdir <var>path</var></code></dt> +<dd><p>The target directory of the generated header file. The default is the +current directory. +</p> +</dd> +<dt><code>-H</code></dt> +<dt><code>--help</code></dt> +<dd><p>Displays a list of command-line options and then exits. +</p> +</dd> +<dt><code>-m <var>characters</var></code></dt> +<dt><code>--maxlength <var>characters</var></code></dt> +<dd><p>Instructs <code>windmc</code> to generate a warning if the length +of any message exceeds the number specified. +</p> +</dd> +<dt><code>-n</code></dt> +<dt><code>--nullterminate</code></dt> +<dd><p>Terminate message text in <code>bin</code> files by zero. By default they are +terminated by CR/LF. +</p> +</dd> +<dt><code>-o</code></dt> +<dt><code>--hresult_use</code></dt> +<dd><p>Not yet implemented. Instructs <code>windmc</code> to generate an OLE2 header +file, using HRESULT definitions. Status codes are used if the flag is not +specified. +</p> +</dd> +<dt><code>-O <var>codepage</var></code></dt> +<dt><code>--codepage_out <var>codepage</var></code></dt> +<dd><p>Sets the default codepage to be used to output text files. The default +is ocdepage 1252. +</p> +</dd> +<dt><code>-r <var>path</var></code></dt> +<dt><code>--rcdir <var>path</var></code></dt> +<dd><p>The target directory for the generated <code>rc</code> script and the generated +<code>bin</code> files that the resource compiler script includes. The default +is the current directory. +</p> +</dd> +<dt><code>-u</code></dt> +<dt><code>--unicode_in</code></dt> +<dd><p>Specifies that the input file is UTF16. +</p> +</dd> +<dt><code>-U</code></dt> +<dt><code>--unicode_out</code></dt> +<dd><p>Specifies that messages in the output <code>bin</code> file should be in UTF16 +format. This is the default behaviour. +</p> +</dd> +<dt><code>-v</code></dt> +<dt><code>--verbose</code></dt> +<dd><p>Enable verbose mode. +</p> +</dd> +<dt><code>-V</code></dt> +<dt><code>--version</code></dt> +<dd><p>Prints the version number for <code>windmc</code>. +</p> +</dd> +<dt><code>-x <var>path</var></code></dt> +<dt><code>--xdgb <var>path</var></code></dt> +<dd><p>The path of the <code>dbg</code> C include file that maps message id’s to the +symbolic name. No such file is generated without specifying the switch. +</p></dd> +</dl> + + + +<hr> +<a name="windres"></a> +<div class="header"> +<p> +Next: <a href="#dlltool" accesskey="n" rel="next">dlltool</a>, Previous: <a href="#windmc" accesskey="p" rel="previous">windmc</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="windres-1"></a> +<h2 class="chapter">12 windres</h2> + +<p><code>windres</code> may be used to manipulate Windows resources. +</p> +<blockquote> +<p><em>Warning:</em> <code>windres</code> is not always built as part of the binary +utilities, since it is only useful for Windows targets. +</p></blockquote> + + +<div class="smallexample"> +<pre class="smallexample">windres [options] [input-file] [output-file] +</pre></div> + + +<p><code>windres</code> reads resources from an input file and copies them into +an output file. Either file may be in one of three formats: +</p> +<dl compact="compact"> +<dt><code>rc</code></dt> +<dd><p>A text format read by the Resource Compiler. +</p> +</dd> +<dt><code>res</code></dt> +<dd><p>A binary format generated by the Resource Compiler. +</p> +</dd> +<dt><code>coff</code></dt> +<dd><p>A COFF object or executable. +</p></dd> +</dl> + +<p>The exact description of these different formats is available in +documentation from Microsoft. +</p> +<p>When <code>windres</code> converts from the <code>rc</code> format to the <code>res</code> +format, it is acting like the Windows Resource Compiler. When +<code>windres</code> converts from the <code>res</code> format to the <code>coff</code> +format, it is acting like the Windows <code>CVTRES</code> program. +</p> +<p>When <code>windres</code> generates an <code>rc</code> file, the output is similar +but not identical to the format expected for the input. When an input +<code>rc</code> file refers to an external filename, an output <code>rc</code> file +will instead include the file contents. +</p> +<p>If the input or output format is not specified, <code>windres</code> will +guess based on the file name, or, for the input file, the file contents. +A file with an extension of <samp>.rc</samp> will be treated as an <code>rc</code> +file, a file with an extension of <samp>.res</samp> will be treated as a +<code>res</code> file, and a file with an extension of <samp>.o</samp> or +<samp>.exe</samp> will be treated as a <code>coff</code> file. +</p> +<p>If no output file is specified, <code>windres</code> will print the resources +in <code>rc</code> format to standard output. +</p> +<p>The normal use is for you to write an <code>rc</code> file, use <code>windres</code> +to convert it to a COFF object file, and then link the COFF file into +your application. This will make the resources described in the +<code>rc</code> file available to Windows. +</p> + + +<dl compact="compact"> +<dt><code>-i <var>filename</var></code></dt> +<dt><code>--input <var>filename</var></code></dt> +<dd><p>The name of the input file. If this option is not used, then +<code>windres</code> will use the first non-option argument as the input file +name. If there are no non-option arguments, then <code>windres</code> will +read from standard input. <code>windres</code> can not read a COFF file from +standard input. +</p> +</dd> +<dt><code>-o <var>filename</var></code></dt> +<dt><code>--output <var>filename</var></code></dt> +<dd><p>The name of the output file. If this option is not used, then +<code>windres</code> will use the first non-option argument, after any used +for the input file name, as the output file name. If there is no +non-option argument, then <code>windres</code> will write to standard output. +<code>windres</code> can not write a COFF file to standard output. Note, +for compatibility with <code>rc</code> the option <samp>-fo</samp> is also +accepted, but its use is not recommended. +</p> +</dd> +<dt><code>-J <var>format</var></code></dt> +<dt><code>--input-format <var>format</var></code></dt> +<dd><p>The input format to read. <var>format</var> may be ‘<samp>res</samp>’, ‘<samp>rc</samp>’, or +‘<samp>coff</samp>’. If no input format is specified, <code>windres</code> will +guess, as described above. +</p> +</dd> +<dt><code>-O <var>format</var></code></dt> +<dt><code>--output-format <var>format</var></code></dt> +<dd><p>The output format to generate. <var>format</var> may be ‘<samp>res</samp>’, +‘<samp>rc</samp>’, or ‘<samp>coff</samp>’. If no output format is specified, +<code>windres</code> will guess, as described above. +</p> +</dd> +<dt><code>-F <var>target</var></code></dt> +<dt><code>--target <var>target</var></code></dt> +<dd><p>Specify the BFD format to use for a COFF file as input or output. This +is a BFD target name; you can use the <samp>--help</samp> option to see a list +of supported targets. Normally <code>windres</code> will use the default +format, which is the first one listed by the <samp>--help</samp> option. +<a href="#Target-Selection">Target Selection</a>. +</p> +</dd> +<dt><code>--preprocessor <var>program</var></code></dt> +<dd><p>When <code>windres</code> reads an <code>rc</code> file, it runs it through the C +preprocessor first. This option may be used to specify the preprocessor +to use. The default preprocessor is <code>gcc</code>. +</p> +</dd> +<dt><code>--preprocessor-arg <var>option</var></code></dt> +<dd><p>When <code>windres</code> reads an <code>rc</code> 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. +If the <samp>--preprocessor</samp> option has not been specified then a +default set of preprocessor arguments will be used, with any +<samp>--preprocessor-arg</samp> options being placed after them on the +command line. These default arguments are <code>-E</code>, +<code>-xc-header</code> and <code>-DRC_INVOKED</code>. +</p> +</dd> +<dt><code>-I <var>directory</var></code></dt> +<dt><code>--include-dir <var>directory</var></code></dt> +<dd><p>Specify an include directory to use when reading an <code>rc</code> file. +<code>windres</code> will pass this to the preprocessor as an <samp>-I</samp> +option. <code>windres</code> will also search this directory when looking for +files named in the <code>rc</code> file. If the argument passed to this command +matches any of the supported <var>formats</var> (as described in the <samp>-J</samp> +option), it will issue a deprecation warning, and behave just like the +<samp>-J</samp> option. New programs should not use this behaviour. If a +directory happens to match a <var>format</var>, simple prefix it with ‘<samp>./</samp>’ +to disable the backward compatibility. +</p> +</dd> +<dt><code>-D <var>target</var></code></dt> +<dt><code>--define <var>sym</var>[=<var>val</var>]</code></dt> +<dd><p>Specify a <samp>-D</samp> option to pass to the preprocessor when reading an +<code>rc</code> file. +</p> +</dd> +<dt><code>-U <var>target</var></code></dt> +<dt><code>--undefine <var>sym</var></code></dt> +<dd><p>Specify a <samp>-U</samp> option to pass to the preprocessor when reading an +<code>rc</code> file. +</p> +</dd> +<dt><code>-r</code></dt> +<dd><p>Ignored for compatibility with rc. +</p> +</dd> +<dt><code>-v</code></dt> +<dd><p>Enable verbose mode. This tells you what the preprocessor is if you +didn’t specify one. +</p> +</dd> +<dt><code>-c <var>val</var></code></dt> +<dt><code>--codepage <var>val</var></code></dt> +<dd><p>Specify the default codepage to use when reading an <code>rc</code> file. +<var>val</var> should be a hexadecimal prefixed by ‘<samp>0x</samp>’ or decimal +codepage code. The valid range is from zero up to 0xffff, but the +validity of the codepage is host and configuration dependent. +</p> +</dd> +<dt><code>-l <var>val</var></code></dt> +<dt><code>--language <var>val</var></code></dt> +<dd><p>Specify the default language to use when reading an <code>rc</code> file. +<var>val</var> should be a hexadecimal language code. The low eight bits are +the language, and the high eight bits are the sublanguage. +</p> +</dd> +<dt><code>--use-temp-file</code></dt> +<dd><p>Use a temporary file to instead of using popen to read the output of +the preprocessor. Use this option if the popen implementation is buggy +on the host (eg., certain non-English language versions of Windows 95 and +Windows 98 are known to have buggy popen where the output will instead +go the console). +</p> +</dd> +<dt><code>--no-use-temp-file</code></dt> +<dd><p>Use popen, not a temporary file, to read the output of the preprocessor. +This is the default behaviour. +</p> +</dd> +<dt><code>-h</code></dt> +<dt><code>--help</code></dt> +<dd><p>Prints a usage summary. +</p> +</dd> +<dt><code>-V</code></dt> +<dt><code>--version</code></dt> +<dd><p>Prints the version number for <code>windres</code>. +</p> +</dd> +<dt><code>--yydebug</code></dt> +<dd><p>If <code>windres</code> is compiled with <code>YYDEBUG</code> defined as <code>1</code>, +this will turn on parser debugging. +</p></dd> +</dl> + + + +<hr> +<a name="dlltool"></a> +<div class="header"> +<p> +Next: <a href="#readelf" accesskey="n" rel="next">readelf</a>, Previous: <a href="#windres" accesskey="p" rel="previous">windres</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="dlltool-1"></a> +<h2 class="chapter">13 dlltool</h2> +<a name="index-DLL"></a> +<a name="index-dlltool"></a> + +<p><code>dlltool</code> is used to create the files needed to create dynamic +link libraries (DLLs) on systems which understand PE format image +files such as Windows. A DLL contains an export table which contains +information that the runtime loader needs to resolve references from a +referencing program. +</p> +<p>The export table is generated by this program by reading in a +<samp>.def</samp> file or scanning the <samp>.a</samp> and <samp>.o</samp> files which +will be in the DLL. A <samp>.o</samp> file can contain information in +special ‘<samp>.drectve</samp>’ sections with export information. +</p> +<blockquote> +<p><em>Note:</em> <code>dlltool</code> is not always built as part of the +binary utilities, since it is only useful for those targets which +support DLLs. +</p></blockquote> + + +<div class="smallexample"> +<pre class="smallexample">dlltool [<samp>-d</samp>|<samp>--input-def</samp> <var>def-file-name</var>] + [<samp>-b</samp>|<samp>--base-file</samp> <var>base-file-name</var>] + [<samp>-e</samp>|<samp>--output-exp</samp> <var>exports-file-name</var>] + [<samp>-z</samp>|<samp>--output-def</samp> <var>def-file-name</var>] + [<samp>-l</samp>|<samp>--output-lib</samp> <var>library-file-name</var>] + [<samp>-y</samp>|<samp>--output-delaylib</samp> <var>library-file-name</var>] + [<samp>--export-all-symbols</samp>] [<samp>--no-export-all-symbols</samp>] + [<samp>--exclude-symbols</samp> <var>list</var>] + [<samp>--no-default-excludes</samp>] + [<samp>-S</samp>|<samp>--as</samp> <var>path-to-assembler</var>] [<samp>-f</samp>|<samp>--as-flags</samp> <var>options</var>] + [<samp>-D</samp>|<samp>--dllname</samp> <var>name</var>] [<samp>-m</samp>|<samp>--machine</samp> <var>machine</var>] + [<samp>-a</samp>|<samp>--add-indirect</samp>] + [<samp>-U</samp>|<samp>--add-underscore</samp>] [<samp>--add-stdcall-underscore</samp>] + [<samp>-k</samp>|<samp>--kill-at</samp>] [<samp>-A</samp>|<samp>--add-stdcall-alias</samp>] + [<samp>-p</samp>|<samp>--ext-prefix-alias</samp> <var>prefix</var>] + [<samp>-x</samp>|<samp>--no-idata4</samp>] [<samp>-c</samp>|<samp>--no-idata5</samp>] + [<samp>--use-nul-prefixed-import-tables</samp>] + [<samp>-I</samp>|<samp>--identify</samp> <var>library-file-name</var>] [<samp>--identify-strict</samp>] + [<samp>-i</samp>|<samp>--interwork</samp>] + [<samp>-n</samp>|<samp>--nodelete</samp>] [<samp>-t</samp>|<samp>--temp-prefix</samp> <var>prefix</var>] + [<samp>-v</samp>|<samp>--verbose</samp>] + [<samp>-h</samp>|<samp>--help</samp>] [<samp>-V</samp>|<samp>--version</samp>] + [<samp>--no-leading-underscore</samp>] [<samp>--leading-underscore</samp>] + [<samp>--deterministic-libraries</samp>] [<samp>--non-deterministic-libraries</samp>] + [object-file …] +</pre></div> + + +<p><code>dlltool</code> reads its inputs, which can come from the <samp>-d</samp> and +<samp>-b</samp> options as well as object files specified on the command +line. It then processes these inputs and if the <samp>-e</samp> option has +been specified it creates a exports file. If the <samp>-l</samp> option +has been specified it creates a library file and if the <samp>-z</samp> option +has been specified it creates a def file. Any or all of the <samp>-e</samp>, +<samp>-l</samp> and <samp>-z</samp> options can be present in one invocation of +dlltool. +</p> +<p>When creating a DLL, along with the source for the DLL, it is necessary +to have three other files. <code>dlltool</code> can help with the creation of +these files. +</p> +<p>The first file is a <samp>.def</samp> file which specifies which functions are +exported from the DLL, which functions the DLL imports, and so on. This +is a text file and can be created by hand, or <code>dlltool</code> can be used +to create it using the <samp>-z</samp> option. In this case <code>dlltool</code> +will scan the object files specified on its command line looking for +those functions which have been specially marked as being exported and +put entries for them in the <samp>.def</samp> file it creates. +</p> +<p>In order to mark a function as being exported from a DLL, it needs to +have an <samp>-export:<name_of_function></samp> entry in the ‘<samp>.drectve</samp>’ +section of the object file. This can be done in C by using the +asm() operator: +</p> +<div class="smallexample"> +<pre class="smallexample"> asm (".section .drectve"); + asm (".ascii \"-export:my_func\""); + + int my_func (void) { … } +</pre></div> + +<p>The second file needed for DLL creation is an exports file. This file +is linked with the object files that make up the body of the DLL and it +handles the interface between the DLL and the outside world. This is a +binary file and it can be created by giving the <samp>-e</samp> option to +<code>dlltool</code> when it is creating or reading in a <samp>.def</samp> file. +</p> +<p>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 (an ‘import +library’). This file can be created by giving the <samp>-l</samp> option to +dlltool when it is creating or reading in a <samp>.def</samp> file. +</p> +<p>If the <samp>-y</samp> 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. +</p> +<p><code>dlltool</code> builds the library file by hand, but it builds the +exports file by creating temporary files containing assembler statements +and then assembling these. The <samp>-S</samp> command-line option can be +used to specify the path to the assembler that dlltool will use, +and the <samp>-f</samp> option can be used to pass specific flags to that +assembler. The <samp>-n</samp> can be used to prevent dlltool from deleting +these temporary assembler files when it is done, and if <samp>-n</samp> is +specified twice then this will prevent dlltool from deleting the +temporary object files it used to build the library. +</p> +<p>Here is an example of creating a DLL from a source file ‘<samp>dll.c</samp>’ and +also creating a program (from an object file called ‘<samp>program.o</samp>’) +that uses that DLL: +</p> +<div class="smallexample"> +<pre class="smallexample"> gcc -c dll.c + dlltool -e exports.o -l dll.lib dll.o + gcc dll.o exports.o -o dll.dll + gcc program.o dll.lib -o program +</pre></div> + + +<p><code>dlltool</code> 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 <samp>-I</samp> or <samp>--identify</samp> option. +</p> + + +<p>The command-line options have the following meanings: +</p> +<dl compact="compact"> +<dt><code>-d <var>filename</var></code></dt> +<dt><code>--input-def <var>filename</var></code></dt> +<dd><a name="index-input-_002edef-file"></a> +<p>Specifies the name of a <samp>.def</samp> file to be read in and processed. +</p> +</dd> +<dt><code>-b <var>filename</var></code></dt> +<dt><code>--base-file <var>filename</var></code></dt> +<dd><a name="index-base-files"></a> +<p>Specifies the name of a base file to be read in and processed. The +contents of this file will be added to the relocation section in the +exports file generated by dlltool. +</p> +</dd> +<dt><code>-e <var>filename</var></code></dt> +<dt><code>--output-exp <var>filename</var></code></dt> +<dd><p>Specifies the name of the export file to be created by dlltool. +</p> +</dd> +<dt><code>-z <var>filename</var></code></dt> +<dt><code>--output-def <var>filename</var></code></dt> +<dd><p>Specifies the name of the <samp>.def</samp> file to be created by dlltool. +</p> +</dd> +<dt><code>-l <var>filename</var></code></dt> +<dt><code>--output-lib <var>filename</var></code></dt> +<dd><p>Specifies the name of the library file to be created by dlltool. +</p> +</dd> +<dt><code>-y <var>filename</var></code></dt> +<dt><code>--output-delaylib <var>filename</var></code></dt> +<dd><p>Specifies the name of the delay-import library file to be created by dlltool. +</p> +</dd> +<dt><code>--deterministic-libraries</code></dt> +<dt><code>--non-deterministic-libraries</code></dt> +<dd><p>When creating output libraries in response to either the +<samp>--output-lib</samp> or <samp>--output-delaylib</samp> options either use +the value of zero for any timestamps, user ids and group ids created +(<samp>--deterministic-libraries</samp>) or the actual timestamps, user +ids and group ids (<samp>--non-deterministic-libraries</samp>). +</p> +</dd> +<dt><code>--export-all-symbols</code></dt> +<dd><p>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 +are not exported by default; see the <samp>--no-default-excludes</samp> +option. You may add to the list of symbols to not export by using the +<samp>--exclude-symbols</samp> option. +</p> +</dd> +<dt><code>--no-export-all-symbols</code></dt> +<dd><p>Only export symbols explicitly listed in an input <samp>.def</samp> file or in +‘<samp>.drectve</samp>’ sections in the input object files. This is the default +behaviour. The ‘<samp>.drectve</samp>’ sections are created by ‘<samp>dllexport</samp>’ +attributes in the source code. +</p> +</dd> +<dt><code>--exclude-symbols <var>list</var></code></dt> +<dd><p>Do not export the symbols in <var>list</var>. This is a list of symbol names +separated by comma or colon characters. The symbol names should not +contain a leading underscore. This is only meaningful when +<samp>--export-all-symbols</samp> is used. +</p> +</dd> +<dt><code>--no-default-excludes</code></dt> +<dd><p>When <samp>--export-all-symbols</samp> is used, it will by default avoid +exporting certain special symbols. The current list of symbols to avoid +exporting is ‘<samp>DllMain@12</samp>’, ‘<samp>DllEntryPoint@0</samp>’, +‘<samp>impure_ptr</samp>’. You may use the <samp>--no-default-excludes</samp> option +to go ahead and export these special symbols. This is only meaningful +when <samp>--export-all-symbols</samp> is used. +</p> +</dd> +<dt><code>-S <var>path</var></code></dt> +<dt><code>--as <var>path</var></code></dt> +<dd><p>Specifies the path, including the filename, of the assembler to be used +to create the exports file. +</p> +</dd> +<dt><code>-f <var>options</var></code></dt> +<dt><code>--as-flags <var>options</var></code></dt> +<dd><p>Specifies any specific command-line options to be passed to the +assembler when building the exports file. This option will work even if +the <samp>-S</samp> option is not used. This option only takes one argument, +and if it occurs more than once on the command line, then later +occurrences will override earlier occurrences. So if it is necessary to +pass multiple options to the assembler they should be enclosed in +double quotes. +</p> +</dd> +<dt><code>-D <var>name</var></code></dt> +<dt><code>--dll-name <var>name</var></code></dt> +<dd><p>Specifies the name to be stored in the <samp>.def</samp> file as the name of +the DLL when the <samp>-e</samp> option is used. If this option is not +present, then the filename given to the <samp>-e</samp> option will be +used as the name of the DLL. +</p> +</dd> +<dt><code>-m <var>machine</var></code></dt> +<dt><code>-machine <var>machine</var></code></dt> +<dd><p>Specifies the type of machine for which the library file should be +built. <code>dlltool</code> has a built in default type, depending upon how +it was created, but this option can be used to override that. This is +normally only useful when creating DLLs for an ARM processor, when the +contents of the DLL are actually encode using Thumb instructions. +</p> +</dd> +<dt><code>-a</code></dt> +<dt><code>--add-indirect</code></dt> +<dd><p>Specifies that when <code>dlltool</code> is creating the exports file it +should add a section which allows the exported functions to be +referenced without using the import library. Whatever the hell that +means! +</p> +</dd> +<dt><code>-U</code></dt> +<dt><code>--add-underscore</code></dt> +<dd><p>Specifies that when <code>dlltool</code> is creating the exports file it +should prepend an underscore to the names of <em>all</em> exported symbols. +</p> +</dd> +<dt><code>--no-leading-underscore</code></dt> +<dt><code>--leading-underscore</code></dt> +<dd><p>Specifies whether standard symbol should be forced to be prefixed, or +not. +</p> +</dd> +<dt><code>--add-stdcall-underscore</code></dt> +<dd><p>Specifies that when <code>dlltool</code> is creating the exports file it +should prepend an underscore to the names of exported <em>stdcall</em> +functions. Variable names and non-stdcall function names are not modified. +This option is useful when creating GNU-compatible import libs for third +party DLLs that were built with MS-Windows tools. +</p> +</dd> +<dt><code>-k</code></dt> +<dt><code>--kill-at</code></dt> +<dd><p>Specifies that ‘<samp>@<number></samp>’ suffixes should be omitted from the names +of stdcall functions that will be imported from the DLL. This is +useful when creating an import library for a DLL which exports stdcall +functions but without the usual ‘<samp>@<number></samp>’ symbol name suffix. +</p> +<p>This does not change the naming of symbols provided by the import library +to programs linked against it, but only the entries in the import table +(ie the .idata section). +</p> +</dd> +<dt><code>-A</code></dt> +<dt><code>--add-stdcall-alias</code></dt> +<dd><p>Specifies that when <code>dlltool</code> is creating the exports file it +should add aliases for stdcall symbols without ‘<samp>@ <number></samp>’ +in addition to the symbols with ‘<samp>@ <number></samp>’. +</p> +</dd> +<dt><code>-p</code></dt> +<dt><code>--ext-prefix-alias <var>prefix</var></code></dt> +<dd><p>Causes <code>dlltool</code> to create external aliases for all DLL +imports with the specified prefix. The aliases are created for both +external and import symbols with no leading underscore. +</p> +</dd> +<dt><code>-x</code></dt> +<dt><code>--no-idata4</code></dt> +<dd><p>Specifies that when <code>dlltool</code> is creating the exports and library +files it should omit the <code>.idata4</code> section. This is for compatibility +with certain operating systems. +</p> +</dd> +<dt><code>--use-nul-prefixed-import-tables</code></dt> +<dd><p>Specifies that when <code>dlltool</code> is creating the exports and library +files it should prefix the <code>.idata4</code> and <code>.idata5</code> by zero an +element. This emulates old gnu import library generation of +<code>dlltool</code>. By default this option is turned off. +</p> +</dd> +<dt><code>-c</code></dt> +<dt><code>--no-idata5</code></dt> +<dd><p>Specifies that when <code>dlltool</code> is creating the exports and library +files it should omit the <code>.idata5</code> section. This is for compatibility +with certain operating systems. +</p> +</dd> +<dt><code>-I <var>filename</var></code></dt> +<dt><code>--identify <var>filename</var></code></dt> +<dd><p>Specifies that <code>dlltool</code> should inspect the import library +indicated by <var>filename</var> and report, on <code>stdout</code>, 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. +<code>dlltool</code> fails if the import library does not exist or is not +actually an import library. See also <samp>--identify-strict</samp>. +</p> +</dd> +<dt><code>--identify-strict</code></dt> +<dd><p>Modifies the behavior of the <samp>--identify</samp> option, such +that an error is reported if <var>filename</var> is associated with +more than one DLL. +</p> +</dd> +<dt><code>-i</code></dt> +<dt><code>--interwork</code></dt> +<dd><p>Specifies that <code>dlltool</code> should mark the objects in the library +file and exports file that it produces as supporting interworking +between ARM and Thumb code. +</p> +</dd> +<dt><code>-n</code></dt> +<dt><code>--nodelete</code></dt> +<dd><p>Makes <code>dlltool</code> preserve the temporary assembler files it used to +create the exports file. If this option is repeated then dlltool will +also preserve the temporary object files it uses to create the library +file. +</p> +</dd> +<dt><code>-t <var>prefix</var></code></dt> +<dt><code>--temp-prefix <var>prefix</var></code></dt> +<dd><p>Makes <code>dlltool</code> use <var>prefix</var> when constructing the names of +temporary assembler and object files. By default, the temp file prefix +is generated from the pid. +</p> +</dd> +<dt><code>-v</code></dt> +<dt><code>--verbose</code></dt> +<dd><p>Make dlltool describe what it is doing. +</p> +</dd> +<dt><code>-h</code></dt> +<dt><code>--help</code></dt> +<dd><p>Displays a list of command-line options and then exits. +</p> +</dd> +<dt><code>-V</code></dt> +<dt><code>--version</code></dt> +<dd><p>Displays dlltool’s version number and then exits. +</p> +</dd> +</dl> + + +<table class="menu" border="0" cellspacing="0"> +<tr><td align="left" valign="top">• <a href="#def-file-format" accesskey="1">def file format</a>:</td><td> </td><td align="left" valign="top">The format of the dlltool <samp>.def</samp> file +</td></tr> +</table> + +<hr> +<a name="def-file-format"></a> +<div class="header"> +<p> +Up: <a href="#dlltool" accesskey="u" rel="up">dlltool</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="The-format-of-the-dlltool-_002edef-file"></a> +<h3 class="section">13.1 The format of the <code>dlltool</code> <samp>.def</samp> file</h3> + +<p>A <samp>.def</samp> file contains any number of the following commands: +</p> +<dl compact="compact"> +<dt><code>NAME</code> <var>name</var> <code>[ ,</code> <var>base</var> <code>]</code></dt> +<dd><p>The result is going to be named <var>name</var><code>.exe</code>. +</p> +</dd> +<dt><code>LIBRARY</code> <var>name</var> <code>[ ,</code> <var>base</var> <code>]</code></dt> +<dd><p>The result is going to be named <var>name</var><code>.dll</code>. +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). +</p> +</dd> +<dt><code>EXPORTS ( ( (</code> <var>name1</var> <code>[ = </code> <var>name2</var> <code>] ) | ( </code> <var>name1</var> <code>=</code> <var>module-name</var> <code>.</code> <var>external-name</var> <code>) ) [ == </code> <var>its_name</var> <code>]</code></dt> +<dt><code>[</code> <var>integer</var> <code>] [ NONAME ] [ CONSTANT ] [ DATA ] [ PRIVATE ] ) *</code></dt> +<dd><p>Declares <var>name1</var> as an exported symbol from the DLL, with optional +ordinal number <var>integer</var>, or declares <var>name1</var> as an alias +(forward) of the function <var>external-name</var> in the DLL. +If <var>its_name</var> is specified, this name is used as string in export table. +<var>module-name</var>. +Note: The <code>EXPORTS</code> has to be the last command in .def file, as keywords +are treated - beside <code>LIBRARY</code> - as simple name-identifiers. +If you want to use LIBRARY as name then you need to quote it. +</p> +</dd> +<dt><code>IMPORTS ( (</code> <var>internal-name</var> <code>=</code> <var>module-name</var> <code>.</code> <var>integer</var> <code>) | [</code> <var>internal-name</var> <code>= ]</code> <var>module-name</var> <code>.</code> <var>external-name</var> <code>) [ == ) <var>its_name</var> <code>]</code> *</code></dt> +<dd><p>Declares that <var>external-name</var> or the exported function whose +ordinal number is <var>integer</var> is to be imported from the file +<var>module-name</var>. If <var>internal-name</var> 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</var> is specified, this name is used as string in import table. +Note: The <code>IMPORTS</code> has to be the last command in .def file, as keywords +are treated - beside <code>LIBRARY</code> - as simple name-identifiers. +If you want to use LIBRARY as name then you need to quote it. +</p> +</dd> +<dt><code>DESCRIPTION</code> <var>string</var></dt> +<dd><p>Puts <var>string</var> into the output <samp>.exp</samp> file in the +<code>.rdata</code> section. +</p> +</dd> +<dt><code>STACKSIZE</code> <var>number-reserve</var> <code>[, </code> <var>number-commit</var> <code>]</code></dt> +<dt><code>HEAPSIZE</code> <var>number-reserve</var> <code>[, </code> <var>number-commit</var> <code>]</code></dt> +<dd><p>Generates <code>--stack</code> or <code>--heap</code> +<var>number-reserve</var>,<var>number-commit</var> in the output <code>.drectve</code> +section. The linker will see this and act upon it. +</p> +</dd> +<dt><code>CODE</code> <var>attr</var> <code>+</code></dt> +<dt><code>DATA</code> <var>attr</var> <code>+</code></dt> +<dt><code>SECTIONS (</code> <var>section-name</var> <var>attr</var><code> + ) *</code></dt> +<dd><p>Generates <code>--attr</code> <var>section-name</var> <var>attr</var> in the output +<code>.drectve</code> section, where <var>attr</var> is one of <code>READ</code>, +<code>WRITE</code>, <code>EXECUTE</code> or <code>SHARED</code>. The linker will see +this and act upon it. +</p> +</dd> +</dl> + + +<hr> +<a name="readelf"></a> +<div class="header"> +<p> +Next: <a href="#elfedit" accesskey="n" rel="next">elfedit</a>, Previous: <a href="#dlltool" accesskey="p" rel="previous">dlltool</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="readelf-1"></a> +<h2 class="chapter">14 readelf</h2> + +<a name="index-ELF-file-information"></a> +<a name="index-readelf"></a> + + +<div class="smallexample"> +<pre class="smallexample">readelf [<samp>-a</samp>|<samp>--all</samp>] + [<samp>-h</samp>|<samp>--file-header</samp>] + [<samp>-l</samp>|<samp>--program-headers</samp>|<samp>--segments</samp>] + [<samp>-S</samp>|<samp>--section-headers</samp>|<samp>--sections</samp>] + [<samp>-g</samp>|<samp>--section-groups</samp>] + [<samp>-t</samp>|<samp>--section-details</samp>] + [<samp>-e</samp>|<samp>--headers</samp>] + [<samp>-s</samp>|<samp>--syms</samp>|<samp>--symbols</samp>] + [<samp>--dyn-syms</samp>|<samp>--lto-syms</samp>] + [<samp>--sym-base=[0|8|10|16]</samp>] + [<samp>--demangle<var>=style</var></samp>|<samp>--no-demangle</samp>] + [<samp>--quiet</samp>] + [<samp>--recurse-limit</samp>|<samp>--no-recurse-limit</samp>] + [<samp>-U</samp> <var>method</var>|<samp>--unicode=</samp><var>method</var>] + [<samp>-n</samp>|<samp>--notes</samp>] + [<samp>-r</samp>|<samp>--relocs</samp>] + [<samp>-u</samp>|<samp>--unwind</samp>] + [<samp>-d</samp>|<samp>--dynamic</samp>] + [<samp>-V</samp>|<samp>--version-info</samp>] + [<samp>-A</samp>|<samp>--arch-specific</samp>] + [<samp>-D</samp>|<samp>--use-dynamic</samp>] + [<samp>-L</samp>|<samp>--lint</samp>|<samp>--enable-checks</samp>] + [<samp>-x</samp> <number or name>|<samp>--hex-dump=</samp><number or name>] + [<samp>-p</samp> <number or name>|<samp>--string-dump=</samp><number or name>] + [<samp>-R</samp> <number or name>|<samp>--relocated-dump=</samp><number or name>] + [<samp>-z</samp>|<samp>--decompress</samp>] + [<samp>-c</samp>|<samp>--archive-index</samp>] + [<samp>-w[lLiaprmfFsoORtUuTgAck]</samp>| + <samp>--debug-dump</samp>[=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]] + [<samp>-wK</samp>|<samp>--debug-dump=follow-links</samp>] + [<samp>-wN</samp>|<samp>--debug-dump=no-follow-links</samp>] + [<samp>-wD</samp>|<samp>--debug-dump=use-debuginfod</samp>] + [<samp>-wE</samp>|<samp>--debug-dump=do-not-use-debuginfod</samp>] + [<samp>-P</samp>|<samp>--process-links</samp>] + [<samp>--dwarf-depth=<var>n</var></samp>] + [<samp>--dwarf-start=<var>n</var></samp>] + [<samp>--ctf=</samp><var>section</var>] + [<samp>--ctf-parent=</samp><var>section</var>] + [<samp>--ctf-symbols=</samp><var>section</var>] + [<samp>--ctf-strings=</samp><var>section</var>] + [<samp>--sframe=</samp><var>section</var>] + [<samp>-I</samp>|<samp>--histogram</samp>] + [<samp>-v</samp>|<samp>--version</samp>] + [<samp>-W</samp>|<samp>--wide</samp>] + [<samp>-T</samp>|<samp>--silent-truncation</samp>] + [<samp>-H</samp>|<samp>--help</samp>] + <var>elffile</var>… +</pre></div> + + +<p><code>readelf</code> displays information about one or more ELF format object +files. The options control what particular information to display. +</p> +<p><var>elffile</var>… are the object files to be examined. 32-bit and +64-bit ELF files are supported, as are archives containing ELF files. +</p> +<p>This program performs a similar function to <code>objdump</code> but it +goes into more detail and it exists independently of the <small>BFD</small> +library, so if there is a bug in <small>BFD</small> then readelf will not be +affected. +</p> + + +<p>The long and short forms of options, shown here as alternatives, are +equivalent. At least one option besides ‘<samp>-v</samp>’ or ‘<samp>-H</samp>’ must be +given. +</p> +<dl compact="compact"> +<dt><code>-a</code></dt> +<dt><code>--all</code></dt> +<dd><p>Equivalent to specifying <samp>--file-header</samp>, +<samp>--program-headers</samp>, <samp>--sections</samp>, <samp>--symbols</samp>, +<samp>--relocs</samp>, <samp>--dynamic</samp>, <samp>--notes</samp>, +<samp>--version-info</samp>, <samp>--arch-specific</samp>, <samp>--unwind</samp>, +<samp>--section-groups</samp> and <samp>--histogram</samp>. +</p> +<p>Note - this option does not enable <samp>--use-dynamic</samp> itself, so +if that option is not present on the command line then dynamic symbols +and dynamic relocs will not be displayed. +</p> +</dd> +<dt><code>-h</code></dt> +<dt><code>--file-header</code></dt> +<dd><a name="index-ELF-file-header-information"></a> +<p>Displays the information contained in the ELF header at the start of the +file. +</p> +</dd> +<dt><code>-l</code></dt> +<dt><code>--program-headers</code></dt> +<dt><code>--segments</code></dt> +<dd><a name="index-ELF-program-header-information"></a> +<a name="index-ELF-segment-information"></a> +<p>Displays the information contained in the file’s segment headers, if it +has any. +</p> +</dd> +<dt><code>--quiet</code></dt> +<dd><a name="index-quiet"></a> +<p>Suppress "no symbols" diagnostic. +</p> +</dd> +<dt><code>-S</code></dt> +<dt><code>--sections</code></dt> +<dt><code>--section-headers</code></dt> +<dd><a name="index-ELF-section-information"></a> +<p>Displays the information contained in the file’s section headers, if it +has any. +</p> +</dd> +<dt><code>-g</code></dt> +<dt><code>--section-groups</code></dt> +<dd><a name="index-ELF-section-group-information"></a> +<p>Displays the information contained in the file’s section groups, if it +has any. +</p> +</dd> +<dt><code>-t</code></dt> +<dt><code>--section-details</code></dt> +<dd><a name="index-ELF-section-information-1"></a> +<p>Displays the detailed section information. Implies <samp>-S</samp>. +</p> +</dd> +<dt><code>-s</code></dt> +<dt><code>--symbols</code></dt> +<dt><code>--syms</code></dt> +<dd><a name="index-ELF-symbol-table-information"></a> +<p>Displays the entries in symbol table section of the file, if it has one. +If a symbol has version information associated with it then this is +displayed as well. The version string is displayed as a suffix to the +symbol name, preceded by an @ character. For example +‘<samp>foo@VER_1</samp>’. 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</samp>’. +</p> +</dd> +<dt><code>--dyn-syms</code></dt> +<dd><a name="index-ELF-dynamic-symbol-table-information"></a> +<p>Displays the entries in dynamic symbol table section of the file, if it +has one. The output format is the same as the format used by the +<samp>--syms</samp> option. +</p> +</dd> +<dt><code>--lto-syms</code></dt> +<dd><a name="index-LTO-symbol-table"></a> +<p>Displays the contents of any LTO symbol tables in the file. +</p> +</dd> +<dt><code>--sym-base=[0|8|10|16]</code></dt> +<dd><a name="index-symbol-table-size-base"></a> +<p>Forces the size field of the symbol table to use the given base. Any +unrecognized options will be treated as ‘<samp>0</samp>’. <samp>--sym-base=0</samp> +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. +<samp>--sym-base=8</samp> will give the symbol sizes in octal. +<samp>--sym-base=10</samp> will always give the symbol sizes in decimal. +<samp>--sym-base=16</samp> will always give the symbol sizes in hexadecimal with a +0x prefix. +</p> +</dd> +<dt><code>-C</code></dt> +<dt><code>--demangle[=<var>style</var>]</code></dt> +<dd><a name="index-demangling-in-nm-1"></a> +<p>Decode (<em>demangle</em>) low-level symbol names into user-level names. +This makes C++ function names readable. Different compilers have +different mangling styles. The optional demangling style argument can +be used to choose an appropriate demangling style for your +compiler. See <a href="#c_002b_002bfilt">c++filt</a>, for more information on demangling. +</p> +</dd> +<dt><code>--no-demangle</code></dt> +<dd><p>Do not demangle low-level symbol names. This is the default. +</p> +</dd> +<dt><code>--recurse-limit</code></dt> +<dt><code>--no-recurse-limit</code></dt> +<dt><code>--recursion-limit</code></dt> +<dt><code>--no-recursion-limit</code></dt> +<dd><p>Enables or disables a limit on the amount of recursion performed +whilst demangling strings. Since the name mangling formats allow for +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. +</p> +<p>The default is for this limit to be enabled, but disabling it may be +necessary in order to demangle truly complicated names. Note however +that if the recursion limit is disabled then stack exhaustion is +possible and any bug reports about such an event will be rejected. +</p> +</dd> +<dt><code>-U <var>[d|i|l|e|x|h]</var></code></dt> +<dt><code>--unicode=[default|invalid|locale|escape|hex|highlight]</code></dt> +<dd><p>Controls the display of non-ASCII characters in identifier names. +The default (<samp>--unicode=locale</samp> or <samp>--unicode=default</samp>) 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 <samp>--unicode=invalid</samp> option is used then +they are displayed as a sequence of hex bytes, encloses in curly +parethesis characters. +</p> +<p>Using the <samp>--unicode=escape</samp> option will display the characters +as as unicode escape sequences (<var>\uxxxx</var>). Using the +<samp>--unicode=hex</samp> will display the characters as hex byte +sequences enclosed between angle brackets. +</p> +<p>Using the <samp>--unicode=highlight</samp> 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. +</p> +</dd> +<dt><code>-e</code></dt> +<dt><code>--headers</code></dt> +<dd><p>Display all the headers in the file. Equivalent to <samp>-h -l -S</samp>. +</p> +</dd> +<dt><code>-n</code></dt> +<dt><code>--notes</code></dt> +<dd><a name="index-ELF-notes"></a> +<p>Displays the contents of the NOTE segments and/or sections, if any. +</p> +</dd> +<dt><code>-r</code></dt> +<dt><code>--relocs</code></dt> +<dd><a name="index-ELF-reloc-information"></a> +<p>Displays the contents of the file’s relocation section, if it has one. +</p> +</dd> +<dt><code>-u</code></dt> +<dt><code>--unwind</code></dt> +<dd><a name="index-unwind-information"></a> +<p>Displays the contents of the file’s unwind section, if it has one. Only +the unwind sections for IA64 ELF files, as well as ARM unwind tables +(<code>.ARM.exidx</code> / <code>.ARM.extab</code>) are currently supported. If +support is not yet implemented for your architecture you could try +dumping the contents of the <var>.eh_frames</var> section using the +<samp>--debug-dump=frames</samp> or <samp>--debug-dump=frames-interp</samp> +options. +</p> +</dd> +<dt><code>-d</code></dt> +<dt><code>--dynamic</code></dt> +<dd><a name="index-ELF-dynamic-section-information"></a> +<p>Displays the contents of the file’s dynamic section, if it has one. +</p> +</dd> +<dt><code>-V</code></dt> +<dt><code>--version-info</code></dt> +<dd><a name="index-ELF-version-sections-information"></a> +<p>Displays the contents of the version sections in the file, it they +exist. +</p> +</dd> +<dt><code>-A</code></dt> +<dt><code>--arch-specific</code></dt> +<dd><p>Displays architecture-specific information in the file, if there +is any. +</p> +</dd> +<dt><code>-D</code></dt> +<dt><code>--use-dynamic</code></dt> +<dd><p>When displaying symbols, this option makes <code>readelf</code> use the +symbol hash tables in the file’s dynamic section, rather than the +symbol table sections. +</p> +<p>When displaying relocations, this option makes <code>readelf</code> +display the dynamic relocations rather than the static relocations. +</p> +</dd> +<dt><code>-L</code></dt> +<dt><code>--lint</code></dt> +<dt><code>--enable-checks</code></dt> +<dd><p>Displays warning messages about possible problems with the file(s) +being examined. If used on its own then all of the contents of the +file(s) will be examined. If used with one of the dumping options +then the warning messages will only be produced for the things being +displayed. +</p> +</dd> +<dt><code>-x <number or name></code></dt> +<dt><code>--hex-dump=<number or name></code></dt> +<dd><p>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. +</p> +</dd> +<dt><code>-R <number or name></code></dt> +<dt><code>--relocated-dump=<number or name></code></dt> +<dd><p>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. +</p> +</dd> +<dt><code>-p <number or name></code></dt> +<dt><code>--string-dump=<number or name></code></dt> +<dd><p>Displays the contents of the indicated section as printable strings. +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. +</p> +</dd> +<dt><code>-z</code></dt> +<dt><code>--decompress</code></dt> +<dd><p>Requests that the section(s) being dumped by <samp>x</samp>, <samp>R</samp> or +<samp>p</samp> options are decompressed before being displayed. If the +section(s) are not compressed then they are displayed as is. +</p> +</dd> +<dt><code>-c</code></dt> +<dt><code>--archive-index</code></dt> +<dd><a name="index-Archive-file-symbol-index-information"></a> +<p>Displays the file symbol index information contained in the header part +of binary archives. Performs the same function as the <samp>t</samp> +command to <code>ar</code>, but without using the BFD library. See <a href="#ar">ar</a>. +</p> +</dd> +<dt><code>-w[lLiaprmfFsOoRtUuTgAckK]</code></dt> +<dt><code>--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]</code></dt> +<dd> +<p>Displays the contents of the DWARF debug sections in the file, if any +are present. Compressed debug sections are automatically decompressed +(temporarily) before they are displayed. If one or more of the +optional letters or words follows the switch then only those type(s) +of data will be dumped. The letters and words refer to the following +information: +</p> +<dl compact="compact"> +<dt><code>a</code></dt> +<dt><code>=abbrev</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_abbrev</samp>’ section. +</p> +</dd> +<dt><code>A</code></dt> +<dt><code>=addr</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_addr</samp>’ section. +</p> +</dd> +<dt><code>c</code></dt> +<dt><code>=cu_index</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_cu_index</samp>’ and/or +‘<samp>.debug_tu_index</samp>’ sections. +</p> +</dd> +<dt><code>f</code></dt> +<dt><code>=frames</code></dt> +<dd><p>Display the raw contents of a ‘<samp>.debug_frame</samp>’ section. +</p> +</dd> +<dt><code>F</code></dt> +<dt><code>=frames-interp</code></dt> +<dd><p>Display the interpreted contents of a ‘<samp>.debug_frame</samp>’ section. +</p> +</dd> +<dt><code>g</code></dt> +<dt><code>=gdb_index</code></dt> +<dd><p>Displays the contents of the ‘<samp>.gdb_index</samp>’ and/or +‘<samp>.debug_names</samp>’ sections. +</p> +</dd> +<dt><code>i</code></dt> +<dt><code>=info</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_info</samp>’ section. Note: the +output from this option can also be restricted by the use of the +<samp>--dwarf-depth</samp> and <samp>--dwarf-start</samp> options. +</p> +</dd> +<dt><code>k</code></dt> +<dt><code>=links</code></dt> +<dd><p>Displays the contents of the ‘<samp>.gnu_debuglink</samp>’, +‘<samp>.gnu_debugaltlink</samp>’ and ‘<samp>.debug_sup</samp>’ sections, if any of +them are present. Also displays any links to separate dwarf object +files (dwo), if they are specified by the DW_AT_GNU_dwo_name or +DW_AT_dwo_name attributes in the ‘<samp>.debug_info</samp>’ section. +</p> +</dd> +<dt><code>K</code></dt> +<dt><code>=follow-links</code></dt> +<dd><p>Display the contents of any selected debug sections that are found in +linked, separate debug info file(s). This can result in multiple +versions of the same debug section being displayed if it exists in +more than one file. +</p> +<p>In addition, when displaying DWARF attributes, if a form is found that +references the separate debug info file, then the referenced contents +will also be displayed. +</p> +<p>Note - in some distributions this option is enabled by default. It +can be disabled via the <samp>N</samp> debug option. The default can be +chosen when configuring the binutils via the +<samp>--enable-follow-debug-links=yes</samp> or +<samp>--enable-follow-debug-links=no</samp> options. If these are not +used then the default is to enable the following of debug links. +</p> +<p>Note - if support for the debuginfod protocol was enabled when the +binutils were built then this option will also include an attempt to +contact any debuginfod servers mentioned in the <var>DEBUGINFOD_URLS</var> +environment variable. This could take some time to resolve. This +behaviour can be disabled via the <samp>=do-not-use-debuginfod</samp> debug +option. +</p> +</dd> +<dt><code>N</code></dt> +<dt><code>=no-follow-links</code></dt> +<dd><p>Disables the following of links to separate debug info files. +</p> +</dd> +<dt><code>D</code></dt> +<dt><code>=use-debuginfod</code></dt> +<dd><p>Enables contacting debuginfod servers if there is a need to follow +debug links. This is the default behaviour. +</p> +</dd> +<dt><code>E</code></dt> +<dt><code>=do-not-use-debuginfod</code></dt> +<dd><p>Disables contacting debuginfod servers when there is a need to follow +debug links. +</p> +</dd> +<dt><code>l</code></dt> +<dt><code>=rawline</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_line</samp>’ section in a raw +format. +</p> +</dd> +<dt><code>L</code></dt> +<dt><code>=decodedline</code></dt> +<dd><p>Displays the interpreted contents of the ‘<samp>.debug_line</samp>’ section. +</p> +</dd> +<dt><code>m</code></dt> +<dt><code>=macro</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_macro</samp>’ and/or +‘<samp>.debug_macinfo</samp>’ sections. +</p> +</dd> +<dt><code>o</code></dt> +<dt><code>=loc</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_loc</samp>’ and/or +‘<samp>.debug_loclists</samp>’ sections. +</p> +</dd> +<dt><code>O</code></dt> +<dt><code>=str-offsets</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_str_offsets</samp>’ section. +</p> +</dd> +<dt><code>p</code></dt> +<dt><code>=pubnames</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_pubnames</samp>’ and/or +‘<samp>.debug_gnu_pubnames</samp>’ sections. +</p> +</dd> +<dt><code>r</code></dt> +<dt><code>=aranges</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_aranges</samp>’ section. +</p> +</dd> +<dt><code>R</code></dt> +<dt><code>=Ranges</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_ranges</samp>’ and/or +‘<samp>.debug_rnglists</samp>’ sections. +</p> +</dd> +<dt><code>s</code></dt> +<dt><code>=str</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_str</samp>’, ‘<samp>.debug_line_str</samp>’ +and/or ‘<samp>.debug_str_offsets</samp>’ sections. +</p> +</dd> +<dt><code>t</code></dt> +<dt><code>=pubtype</code></dt> +<dd><p>Displays the contents of the ‘<samp>.debug_pubtypes</samp>’ and/or +‘<samp>.debug_gnu_pubtypes</samp>’ sections. +</p> +</dd> +<dt><code>T</code></dt> +<dt><code>=trace_aranges</code></dt> +<dd><p>Displays the contents of the ‘<samp>.trace_aranges</samp>’ section. +</p> +</dd> +<dt><code>u</code></dt> +<dt><code>=trace_abbrev</code></dt> +<dd><p>Displays the contents of the ‘<samp>.trace_abbrev</samp>’ section. +</p> +</dd> +<dt><code>U</code></dt> +<dt><code>=trace_info</code></dt> +<dd><p>Displays the contents of the ‘<samp>.trace_info</samp>’ section. +</p> +</dd> +</dl> + +<p>Note: displaying the contents of ‘<samp>.debug_static_funcs</samp>’, +‘<samp>.debug_static_vars</samp>’ and ‘<samp>debug_weaknames</samp>’ sections is not +currently supported. +</p> +</dd> +<dt><code>--dwarf-depth=<var>n</var></code></dt> +<dd><p>Limit the dump of the <code>.debug_info</code> section to <var>n</var> children. +This is only useful with <samp>--debug-dump=info</samp>. The default is +to print all DIEs; the special value 0 for <var>n</var> will also have this +effect. +</p> +<p>With a non-zero value for <var>n</var>, DIEs at or deeper than <var>n</var> +levels will not be printed. The range for <var>n</var> is zero-based. +</p> +</dd> +<dt><code>--dwarf-start=<var>n</var></code></dt> +<dd><p>Print only DIEs beginning with the DIE numbered <var>n</var>. This is only +useful with <samp>--debug-dump=info</samp>. +</p> +<p>If specified, this option will suppress printing of any header +information and all DIEs before the DIE numbered <var>n</var>. Only +siblings and children of the specified DIE will be printed. +</p> +<p>This can be used in conjunction with <samp>--dwarf-depth</samp>. +</p> + +</dd> +<dt><code>-P</code></dt> +<dt><code>--process-links</code></dt> +<dd><p>Display the contents of non-debug sections found in separate debuginfo +files that are linked to the main file. This option automatically +implies the <samp>-wK</samp> option, and only sections requested by other +command line options will be displayed. +</p> + +</dd> +<dt><code>--ctf[=<var>section</var>]</code></dt> +<dd><a name="index-CTF-1"></a> +<a name="index-Compact-Type-Format-1"></a> + +<p>Display the contents of the specified CTF section. CTF sections themselves +contain many subsections, all of which are displayed in order. +</p> +<p>By default, display the name of the section named <var>.ctf</var>, which is the +name emitted by <code>ld</code>. +</p> +</dd> +<dt><code>--ctf-parent=<var>member</var></code></dt> +<dd> +<p>If the CTF section contains ambiguously-defined types, it will consist +of an archive of many CTF dictionaries, all inheriting from one +dictionary containing unambiguous types. This member is by default +named <var>.ctf</var>, like the section containing it, but it is possible to +change this name using the <code>ctf_link_set_memb_name_changer</code> +function at link time. When looking at CTF archives that have been +created by a linker that uses the name changer to rename the parent +archive member, <samp>--ctf-parent</samp> can be used to specify the name +used for the parent. +</p></dd> +<dt><code>--ctf-symbols=<var>section</var></code></dt> +<dt><code>--ctf-strings=<var>section</var></code></dt> +<dd><p>Specify the name of another section from which the CTF file can inherit +strings and symbols. By default, the <code>.symtab</code> and its linked +string table are used. +</p> +<p>If either of <samp>--ctf-symbols</samp> or <samp>--ctf-strings</samp> is specified, the +other must be specified as well. +</p> +</dd> +<dt><code>-I</code></dt> +<dt><code>--histogram</code></dt> +<dd><p>Display a histogram of bucket list lengths when displaying the contents +of the symbol tables. +</p> +</dd> +<dt><code>-v</code></dt> +<dt><code>--version</code></dt> +<dd><p>Display the version number of readelf. +</p> +</dd> +<dt><code>-W</code></dt> +<dt><code>--wide</code></dt> +<dd><p>Don’t break output lines to fit into 80 columns. By default +<code>readelf</code> breaks section header and segment listing lines for +64-bit ELF files, so that they fit into 80 columns. This option causes +<code>readelf</code> to print each section header resp. each segment one a +single line, which is far more readable on terminals wider than 80 columns. +</p> +</dd> +<dt><code>-T</code></dt> +<dt><code>--silent-truncation</code></dt> +<dd><p>Normally when readelf is displaying a symbol name, and it has to +truncate the name to fit into an 80 column display, it will add a +suffix of <code>[...]</code> to the name. This command line option +disables this behaviour, allowing 5 more characters of the name to be +displayed and restoring the old behaviour of readelf (prior to release +2.35). +</p> +</dd> +<dt><code>-H</code></dt> +<dt><code>--help</code></dt> +<dd><p>Display the command-line options understood by <code>readelf</code>. +</p> +</dd> +</dl> + + + +<hr> +<a name="elfedit"></a> +<div class="header"> +<p> +Next: <a href="#Common-Options" accesskey="n" rel="next">Common Options</a>, Previous: <a href="#readelf" accesskey="p" rel="previous">readelf</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="elfedit-1"></a> +<h2 class="chapter">15 elfedit</h2> + +<a name="index-Update-ELF-header"></a> +<a name="index-elfedit"></a> + + +<div class="smallexample"> +<pre class="smallexample">elfedit [<samp>--input-mach=</samp><var>machine</var>] + [<samp>--input-type=</samp><var>type</var>] + [<samp>--input-osabi=</samp><var>osabi</var>] + [<samp>--input-abiversion=</samp><var>version</var>] + <samp>--output-mach=</samp><var>machine</var> + <samp>--output-type=</samp><var>type</var> + <samp>--output-osabi=</samp><var>osabi</var> + <samp>--output-abiversion=</samp><var>version</var> + <samp>--enable-x86-feature=</samp><var>feature</var> + <samp>--disable-x86-feature=</samp><var>feature</var> + [<samp>-v</samp>|<samp>--version</samp>] + [<samp>-h</samp>|<samp>--help</samp>] + <var>elffile</var>… +</pre></div> + + +<p><code>elfedit</code> updates the ELF header and program property of ELF +files which have the matching ELF machine and file types. The options +control how and which fields in the ELF header and program property +should be updated. +</p> +<p><var>elffile</var>… are the ELF files to be updated. 32-bit and +64-bit ELF files are supported, as are archives containing ELF files. +</p> + +<p>The long and short forms of options, shown here as alternatives, are +equivalent. At least one of the <samp>--output-mach</samp>, +<samp>--output-type</samp>, <samp>--output-osabi</samp>, +<samp>--output-abiversion</samp>, +<samp>--enable-x86-feature</samp> and <samp>--disable-x86-feature</samp> +options must be given. +</p> +<dl compact="compact"> +<dt><code>--input-mach=<var>machine</var></code></dt> +<dd><p>Set the matching input ELF machine type to <var>machine</var>. If +<samp>--input-mach</samp> isn’t specified, it will match any ELF +machine types. +</p> +<p>The supported ELF machine types are, <var>i386</var>, <var>IAMCU</var>, <var>L1OM</var>, +<var>K1OM</var> and <var>x86-64</var>. +</p> +</dd> +<dt><code>--output-mach=<var>machine</var></code></dt> +<dd><p>Change the ELF machine type in the ELF header to <var>machine</var>. The +supported ELF machine types are the same as <samp>--input-mach</samp>. +</p> +</dd> +<dt><code>--input-type=<var>type</var></code></dt> +<dd><p>Set the matching input ELF file type to <var>type</var>. If +<samp>--input-type</samp> isn’t specified, it will match any ELF file types. +</p> +<p>The supported ELF file types are, <var>rel</var>, <var>exec</var> and <var>dyn</var>. +</p> +</dd> +<dt><code>--output-type=<var>type</var></code></dt> +<dd><p>Change the ELF file type in the ELF header to <var>type</var>. The +supported ELF types are the same as <samp>--input-type</samp>. +</p> +</dd> +<dt><code>--input-osabi=<var>osabi</var></code></dt> +<dd><p>Set the matching input ELF file OSABI to <var>osabi</var>. If +<samp>--input-osabi</samp> isn’t specified, it will match any ELF OSABIs. +</p> +<p>The supported ELF OSABIs are, <var>none</var>, <var>HPUX</var>, <var>NetBSD</var>, +<var>GNU</var>, <var>Linux</var> (alias for <var>GNU</var>), +<var>Solaris</var>, <var>AIX</var>, <var>Irix</var>, +<var>FreeBSD</var>, <var>TRU64</var>, <var>Modesto</var>, <var>OpenBSD</var>, <var>OpenVMS</var>, +<var>NSK</var>, <var>AROS</var> and <var>FenixOS</var>. +</p> +</dd> +<dt><code>--output-osabi=<var>osabi</var></code></dt> +<dd><p>Change the ELF OSABI in the ELF header to <var>osabi</var>. The +supported ELF OSABI are the same as <samp>--input-osabi</samp>. +</p> +</dd> +<dt><code>--input-abiversion=<var>version</var></code></dt> +<dd><p>Set the matching input ELF file ABIVERSION to <var>version</var>. +<var>version</var> must be between 0 and 255. If <samp>--input-abiversion</samp> +isn’t specified, it will match any ELF ABIVERSIONs. +</p> +</dd> +<dt><code>--output-abiversion=<var>version</var></code></dt> +<dd><p>Change the ELF ABIVERSION in the ELF header to <var>version</var>. +<var>version</var> must be between 0 and 255. +</p> +</dd> +<dt><code>--enable-x86-feature=<var>feature</var></code></dt> +<dd><p>Set the <var>feature</var> bit in program property in <var>exec</var> or <var>dyn</var> +ELF files with machine types of <var>i386</var> or <var>x86-64</var>. The +supported features are, <var>ibt</var>, <var>shstk</var>, <var>lam_u48</var> and +<var>lam_u57</var>. +</p> +</dd> +<dt><code>--disable-x86-feature=<var>feature</var></code></dt> +<dd><p>Clear the <var>feature</var> bit in program property in <var>exec</var> or +<var>dyn</var> ELF files with machine types of <var>i386</var> or <var>x86-64</var>. +The supported features are the same as <samp>--enable-x86-feature</samp>. +</p> +<p>Note: <samp>--enable-x86-feature</samp> and <samp>--disable-x86-feature</samp> +are available only on hosts with ‘<samp>mmap</samp>’ support. +</p> +</dd> +<dt><code>-v</code></dt> +<dt><code>--version</code></dt> +<dd><p>Display the version number of <code>elfedit</code>. +</p> +</dd> +<dt><code>-h</code></dt> +<dt><code>--help</code></dt> +<dd><p>Display the command-line options understood by <code>elfedit</code>. +</p> +</dd> +</dl> + + + +<hr> +<a name="Common-Options"></a> +<div class="header"> +<p> +Next: <a href="#Selecting-the-Target-System" accesskey="n" rel="next">Selecting the Target System</a>, Previous: <a href="#elfedit" accesskey="p" rel="previous">elfedit</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="Common-Options-1"></a> +<h2 class="chapter">16 Common Options</h2> + +<p>The following command-line options are supported by all of the +programs described in this manual. +</p> +<dl compact="compact"> +<dt><code>@<var>file</var></code></dt> +<dd><p>Read command-line options from <var>file</var>. The options read are +inserted in place of the original @<var>file</var> option. If <var>file</var> +does not exist, or cannot be read, then the option will be treated +literally, and not removed. +</p> +<p>Options in <var>file</var> are separated by whitespace. A whitespace +character may be included in an option by surrounding the entire +option in either single or double quotes. Any character (including a +backslash) may be included by prefixing the character to be included +with a backslash. The <var>file</var> may itself contain additional +@<var>file</var> options; any such options will be processed recursively. +</p> +</dd> +<dt><code>--help</code></dt> +<dd><p>Display the command-line options supported by the program. +</p> +</dd> +<dt><code>--version</code></dt> +<dd><p>Display the version number of the program. +</p> +</dd> +</dl> + +<hr> +<a name="Selecting-the-Target-System"></a> +<div class="header"> +<p> +Next: <a href="#debuginfod" accesskey="n" rel="next">debuginfod</a>, Previous: <a href="#Common-Options" accesskey="p" rel="previous">Common Options</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="Selecting-the-Target-System-1"></a> +<h2 class="chapter">17 Selecting the Target System</h2> + +<p>You can specify two aspects of the target system to the <small>GNU</small> +binary file utilities, each in several ways: +</p> +<ul> +<li> the target + +</li><li> the architecture +</li></ul> + +<p>In the following summaries, the lists of ways to specify values are in +order of decreasing precedence. The ways listed first override those +listed later. +</p> +<p>The commands to list valid values only list the values for which the +programs you are running were configured. If they were configured with +<samp>--enable-targets=all</samp>, the commands list most of the available +values, but a few are left out; not all targets can be configured in at +once because some of them can only be configured <em>native</em> (on hosts +with the same type as the target system). +</p> +<table class="menu" border="0" cellspacing="0"> +<tr><td align="left" valign="top">• <a href="#Target-Selection" accesskey="1">Target Selection</a>:</td><td> </td><td align="left" valign="top"> +</td></tr> +<tr><td align="left" valign="top">• <a href="#Architecture-Selection" accesskey="2">Architecture Selection</a>:</td><td> </td><td align="left" valign="top"> +</td></tr> +</table> + +<hr> +<a name="Target-Selection"></a> +<div class="header"> +<p> +Next: <a href="#Architecture-Selection" accesskey="n" rel="next">Architecture Selection</a>, Up: <a href="#Selecting-the-Target-System" accesskey="u" rel="up">Selecting the Target System</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="Target-Selection-1"></a> +<h3 class="section">17.1 Target Selection</h3> + +<p>A <em>target</em> is an object file format. A given target may be +supported for multiple architectures (see <a href="#Architecture-Selection">Architecture Selection</a>). +A target selection may also have variations for different operating +systems or architectures. +</p> +<p>The command to list valid target values is ‘<samp>objdump -i</samp>’ +(the first column of output contains the relevant information). +</p> +<p>Some sample values are: ‘<samp>a.out-hp300bsd</samp>’, ‘<samp>ecoff-littlemips</samp>’, +‘<samp>a.out-sunos-big</samp>’. +</p> +<p>You can also specify a target using a configuration triplet. This is +the same sort of name that is passed to <samp>configure</samp> to specify a +target. When you use a configuration triplet as an argument, it must be +fully canonicalized. You can see the canonical version of a triplet by +running the shell script <samp>config.sub</samp> which is included with the +sources. +</p> +<p>Some sample configuration triplets are: ‘<samp>m68k-hp-bsd</samp>’, +‘<samp>mips-dec-ultrix</samp>’, ‘<samp>sparc-sun-sunos</samp>’. +</p> +<a name="objdump-Target"></a> +<h4 class="subheading"><code>objdump</code> Target</h4> + +<p>Ways to specify: +</p> +<ol> +<li> command-line option: <samp>-b</samp> or <samp>--target</samp> + +</li><li> environment variable <code>GNUTARGET</code> + +</li><li> deduced from the input file +</li></ol> + +<a name="objcopy-and-strip-Input-Target"></a> +<h4 class="subheading"><code>objcopy</code> and <code>strip</code> Input Target</h4> + +<p>Ways to specify: +</p> +<ol> +<li> command-line options: <samp>-I</samp> or <samp>--input-target</samp>, or <samp>-F</samp> or <samp>--target</samp> + +</li><li> environment variable <code>GNUTARGET</code> + +</li><li> deduced from the input file +</li></ol> + +<a name="objcopy-and-strip-Output-Target"></a> +<h4 class="subheading"><code>objcopy</code> and <code>strip</code> Output Target</h4> + +<p>Ways to specify: +</p> +<ol> +<li> command-line options: <samp>-O</samp> or <samp>--output-target</samp>, or <samp>-F</samp> or <samp>--target</samp> + +</li><li> the input target (see “<code>objcopy</code> and <code>strip</code> Input Target” above) + +</li><li> environment variable <code>GNUTARGET</code> + +</li><li> deduced from the input file +</li></ol> + +<a name="nm_002c-size_002c-and-strings-Target"></a> +<h4 class="subheading"><code>nm</code>, <code>size</code>, and <code>strings</code> Target</h4> + +<p>Ways to specify: +</p> +<ol> +<li> command-line option: <samp>--target</samp> + +</li><li> environment variable <code>GNUTARGET</code> + +</li><li> deduced from the input file +</li></ol> + +<hr> +<a name="Architecture-Selection"></a> +<div class="header"> +<p> +Previous: <a href="#Target-Selection" accesskey="p" rel="previous">Target Selection</a>, Up: <a href="#Selecting-the-Target-System" accesskey="u" rel="up">Selecting the Target System</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="Architecture-Selection-1"></a> +<h3 class="section">17.2 Architecture Selection</h3> + +<p>An <em>architecture</em> is a type of <small>CPU</small> on which an object file is +to run. Its name may contain a colon, separating the name of the +processor family from the name of the particular <small>CPU</small>. +</p> +<p>The command to list valid architecture values is ‘<samp>objdump -i</samp>’ (the +second column contains the relevant information). +</p> +<p>Sample values: ‘<samp>m68k:68020</samp>’, ‘<samp>mips:3000</samp>’, ‘<samp>sparc</samp>’. +</p> +<a name="objdump-Architecture"></a> +<h4 class="subheading"><code>objdump</code> Architecture</h4> + +<p>Ways to specify: +</p> +<ol> +<li> command-line option: <samp>-m</samp> or <samp>--architecture</samp> + +</li><li> deduced from the input file +</li></ol> + +<a name="objcopy_002c-nm_002c-size_002c-strings-Architecture"></a> +<h4 class="subheading"><code>objcopy</code>, <code>nm</code>, <code>size</code>, <code>strings</code> Architecture</h4> + +<p>Ways to specify: +</p> +<ol> +<li> deduced from the input file +</li></ol> + +<hr> +<a name="debuginfod"></a> +<div class="header"> +<p> +Next: <a href="#Reporting-Bugs" accesskey="n" rel="next">Reporting Bugs</a>, Previous: <a href="#Selecting-the-Target-System" accesskey="p" rel="previous">Selecting the Target System</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="debuginfod-1"></a> +<h2 class="chapter">18 debuginfod</h2> +<a name="index-separate-debug-files"></a> + +<p>debuginfod is a web service that indexes ELF/DWARF debugging resources +by build-id and serves them over HTTP. For more information see: +<em>https://sourceware.org/elfutils/Debuginfod.html</em> +</p> +<p>Binutils can be built with the debuginfod client library +<code>libdebuginfod</code> using the <samp>--with-debuginfod</samp> configure option. +This option is enabled by default if <code>libdebuginfod</code> is installed +and found at configure time. This allows <code>objdump</code> and +<code>readelf</code> to automatically query debuginfod servers for +separate debug files when the files are otherwise not found. +</p> +<p>debuginfod is packaged with elfutils, starting with version 0.178. +You can get the latest version from ‘https://sourceware.org/elfutils/’. +</p> +<p>The DWARF info dumping tools (<code>readelf</code> and <code>objdump</code>) +have options to control when they should access the debuginfod +servers. By default this access is enabled. +</p> +<hr> +<a name="Reporting-Bugs"></a> +<div class="header"> +<p> +Next: <a href="#GNU-Free-Documentation-License" accesskey="n" rel="next">GNU Free Documentation License</a>, Previous: <a href="#debuginfod" accesskey="p" rel="previous">debuginfod</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="Reporting-Bugs-1"></a> +<h2 class="chapter">19 Reporting Bugs</h2> +<a name="index-bugs"></a> +<a name="index-reporting-bugs"></a> + +<p>Your bug reports play an essential role in making the binary utilities +reliable. +</p> +<p>Reporting a bug may help you by bringing a solution to your problem, or +it may not. But in any case the principal function of a bug report is +to help the entire community by making the next version of the binary +utilities work better. Bug reports are your contribution to their +maintenance. +</p> +<p>In order for a bug report to serve its purpose, you must include the +information that enables us to fix the bug. +</p> +<table class="menu" border="0" cellspacing="0"> +<tr><td align="left" valign="top">• <a href="#Bug-Criteria" accesskey="1">Bug Criteria</a>:</td><td> </td><td align="left" valign="top">Have you found a bug? +</td></tr> +<tr><td align="left" valign="top">• <a href="#Bug-Reporting" accesskey="2">Bug Reporting</a>:</td><td> </td><td align="left" valign="top">How to report bugs +</td></tr> +</table> + +<hr> +<a name="Bug-Criteria"></a> +<div class="header"> +<p> +Next: <a href="#Bug-Reporting" accesskey="n" rel="next">Bug Reporting</a>, Up: <a href="#Reporting-Bugs" accesskey="u" rel="up">Reporting Bugs</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="Have-You-Found-a-Bug_003f"></a> +<h3 class="section">19.1 Have You Found a Bug?</h3> +<a name="index-bug-criteria"></a> + +<p>If you are not sure whether you have found a bug, here are some guidelines: +</p> +<ul> +<li> <a name="index-fatal-signal"></a> +<a name="index-crash"></a> +If a binary utility gets a fatal signal, for any input whatever, that is +a bug. Reliable utilities never crash. + +</li><li> <a name="index-error-on-valid-input"></a> +If a binary utility produces an error message for valid input, that is a +bug. + +</li><li> If you are an experienced user of binary utilities, your suggestions for +improvement are welcome in any case. +</li></ul> + +<hr> +<a name="Bug-Reporting"></a> +<div class="header"> +<p> +Previous: <a href="#Bug-Criteria" accesskey="p" rel="previous">Bug Criteria</a>, Up: <a href="#Reporting-Bugs" accesskey="u" rel="up">Reporting Bugs</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="How-to-Report-Bugs"></a> +<h3 class="section">19.2 How to Report Bugs</h3> +<a name="index-bug-reports"></a> +<a name="index-bugs_002c-reporting"></a> + +<p>A number of companies and individuals offer support for <small>GNU</small> +products. If you obtained the binary utilities from a support +organization, we recommend you contact that organization first. +</p> +<p>You can find contact information for many support companies and +individuals in the file <samp>etc/SERVICE</samp> in the <small>GNU</small> Emacs +distribution. +</p> +<p>In any event, we also recommend that you send bug reports for the binary +utilities to <a href="https://bugs.linaro.org/">https://bugs.linaro.org/</a>. +</p> +<p>The fundamental principle of reporting bugs usefully is this: +<strong>report all the facts</strong>. If you are not sure whether to state a +fact or leave it out, state it! +</p> +<p>Often people omit facts because they think they know what causes the +problem and assume that some details do not matter. Thus, you might +assume that the name of a file you use in an example does not matter. +Well, probably it does not, but one cannot be sure. Perhaps the bug is +a stray memory reference which happens to fetch from the location where +that pathname is stored in memory; perhaps, if the pathname were +different, the contents of that location would fool the utility into +doing the right thing despite the bug. Play it safe and give a +specific, complete example. That is the easiest thing for you to do, +and the most helpful. +</p> +<p>Keep in mind that the purpose of a bug report is to enable us to fix the bug if +it is new to us. Therefore, always write your bug reports on the assumption +that the bug has not been reported previously. +</p> +<p>Sometimes people give a few sketchy facts and ask, “Does this ring a +bell?” This cannot help us fix a bug, so it is basically useless. We +respond by asking for enough details to enable us to investigate. +You might as well expedite matters by sending them to begin with. +</p> +<p>To enable us to fix the bug, you should include all these things: +</p> +<ul> +<li> The version of the utility. Each utility announces it if you start it +with the <samp>--version</samp> argument. + +<p>Without this, we will not know whether there is any point in looking for +the bug in the current version of the binary utilities. +</p> +</li><li> Any patches you may have applied to the source, including any patches +made to the <code>BFD</code> library. + +</li><li> The type of machine you are using, and the operating system name and +version number. + +</li><li> What compiler (and its version) was used to compile the utilities—e.g. +“<code>gcc-2.7</code>”. + +</li><li> The command arguments you gave the utility to observe the bug. To +guarantee you will not omit something important, list them all. A copy +of the Makefile (or the output from make) is sufficient. + +<p>If we were to try to guess the arguments, we would probably guess wrong +and then we might not encounter the bug. +</p> +</li><li> A complete input file, or set of input files, that will reproduce the +bug. If the utility is reading an object file or files, then it is +generally most helpful to send the actual object files. + +<p>If the source files were produced exclusively using <small>GNU</small> programs +(e.g., <code>gcc</code>, <code>gas</code>, and/or the <small>GNU</small> <code>ld</code>), then it +may be OK to send the source files rather than the object files. In +this case, be sure to say exactly what version of <code>gcc</code>, or +whatever, was used to produce the object files. Also say how +<code>gcc</code>, or whatever, was configured. +</p> +</li><li> A description of what behavior you observe that you believe is +incorrect. For example, “It gets a fatal signal.” + +<p>Of course, if the bug is that the utility gets a fatal signal, then we +will certainly notice it. But if the bug is incorrect output, we might +not notice unless it is glaringly wrong. You might as well not give us +a chance to make a mistake. +</p> +<p>Even if the problem you experience is a fatal signal, you should still +say so explicitly. Suppose something strange is going on, such as your +copy of the utility is out of sync, or you have encountered a bug in +the C library on your system. (This has happened!) Your copy might +crash and ours would not. If you told us to expect a crash, then when +ours fails to crash, we would know that the bug was not happening for +us. If you had not told us to expect a crash, then we would not be able +to draw any conclusion from our observations. +</p> +</li><li> If you wish to suggest changes to the source, send us context diffs, as +generated by <code>diff</code> with the <samp>-u</samp>, <samp>-c</samp>, or <samp>-p</samp> +option. Always send diffs from the old file to the new file. If you +wish to discuss something in the <code>ld</code> source, refer to it by +context, not by line number. + +<p>The line numbers in our development sources will not match those in your +sources. Your line numbers would convey no useful information to us. +</p></li></ul> + +<p>Here are some things that are not necessary: +</p> +<ul> +<li> A description of the envelope of the bug. + +<p>Often people who encounter a bug spend a lot of time investigating +which changes to the input file will make the bug go away and which +changes will not affect it. +</p> +<p>This is often time consuming and not very useful, because the way we +will find the bug is by running a single example under the debugger +with breakpoints, not by pure deduction from a series of examples. +We recommend that you save your time for something else. +</p> +<p>Of course, if you can find a simpler example to report <em>instead</em> +of the original one, that is a convenience for us. Errors in the +output will be easier to spot, running under the debugger will take +less time, and so on. +</p> +<p>However, simplification is not vital; if you do not want to do this, +report the bug anyway and send us the entire test case you used. +</p> +</li><li> A patch for the bug. + +<p>A patch for the bug does help us if it is a good one. But do not omit +the necessary information, such as the test case, on the assumption that +a patch is all we need. We might see problems with your patch and decide +to fix the problem another way, or we might not understand it at all. +</p> +<p>Sometimes with programs as complicated as the binary utilities it is +very hard to construct an example that will make the program follow a +certain path through the code. If you do not send us the example, we +will not be able to construct one, so we will not be able to verify that +the bug is fixed. +</p> +<p>And if we cannot understand what bug you are trying to fix, or why your +patch should be an improvement, we will not install it. A test case will +help us to understand. +</p> +</li><li> A guess about what the bug is or what it depends on. + +<p>Such guesses are usually wrong. Even we cannot guess right about such +things without first using the debugger to find the facts. +</p></li></ul> + +<hr> +<a name="GNU-Free-Documentation-License"></a> +<div class="header"> +<p> +Next: <a href="#Binutils-Index" accesskey="n" rel="next">Binutils Index</a>, Previous: <a href="#Reporting-Bugs" accesskey="p" rel="previous">Reporting Bugs</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="GNU-Free-Documentation-License-1"></a> +<h2 class="appendix">Appendix A GNU Free Documentation License</h2> + +<div align="center">Version 1.3, 3 November 2008 +</div> + +<div class="display"> +<pre class="display">Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. +<a href="http://fsf.org/">http://fsf.org/</a> + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. +</pre></div> + +<ol> +<li> PREAMBLE + +<p>The purpose of this License is to make a manual, textbook, or other +functional and useful document <em>free</em> in the sense of freedom: to +assure everyone the effective freedom to copy and redistribute it, +with or without modifying it, either commercially or noncommercially. +Secondarily, this License preserves for the author and publisher a way +to get credit for their work, while not being considered responsible +for modifications made by others. +</p> +<p>This License is a kind of “copyleft”, which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. +</p> +<p>We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. +</p> +</li><li> APPLICABILITY AND DEFINITIONS + +<p>This License applies to any manual or other work, in any medium, that +contains a notice placed by the copyright holder saying it can be +distributed under the terms of this License. Such a notice grants a +world-wide, royalty-free license, unlimited in duration, to use that +work under the conditions stated herein. The “Document”, below, +refers to any such manual or work. Any member of the public is a +licensee, and is addressed as “you”. You accept the license if you +copy, modify or distribute the work in a way requiring permission +under copyright law. +</p> +<p>A “Modified Version” of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. +</p> +<p>A “Secondary Section” is a named appendix or a front-matter section +of the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document’s overall +subject (or to related matters) and contains nothing that could fall +directly within that overall subject. (Thus, if the Document is in +part a textbook of mathematics, a Secondary Section may not explain +any mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. +</p> +<p>The “Invariant Sections” are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. If a +section does not fit the above definition of Secondary then it is not +allowed to be designated as Invariant. The Document may contain zero +Invariant Sections. If the Document does not identify any Invariant +Sections then there are none. +</p> +<p>The “Cover Texts” are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. A Front-Cover Text may +be at most 5 words, and a Back-Cover Text may be at most 25 words. +</p> +<p>A “Transparent” copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, that is suitable for revising the document +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup, or absence of markup, has been arranged to thwart +or discourage subsequent modification by readers is not Transparent. +An image format is not Transparent if used for any substantial amount +of text. A copy that is not “Transparent” is called “Opaque”. +</p> +<p>Examples of suitable formats for Transparent copies include plain +<small>ASCII</small> without markup, Texinfo input format, LaTeX input +format, <acronym>SGML</acronym> or <acronym>XML</acronym> using a publicly available +<acronym>DTD</acronym>, and standard-conforming simple <acronym>HTML</acronym>, +PostScript or <acronym>PDF</acronym> designed for human modification. Examples +of transparent image formats include <acronym>PNG</acronym>, <acronym>XCF</acronym> and +<acronym>JPG</acronym>. Opaque formats include proprietary formats that can be +read and edited only by proprietary word processors, <acronym>SGML</acronym> or +<acronym>XML</acronym> for which the <acronym>DTD</acronym> and/or processing tools are +not generally available, and the machine-generated <acronym>HTML</acronym>, +PostScript or <acronym>PDF</acronym> produced by some word processors for +output purposes only. +</p> +<p>The “Title Page” means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, “Title Page” means +the text near the most prominent appearance of the work’s title, +preceding the beginning of the body of the text. +</p> +<p>The “publisher” means any person or entity that distributes copies +of the Document to the public. +</p> +<p>A section “Entitled XYZ” means a named subunit of the Document whose +title either is precisely XYZ or contains XYZ in parentheses following +text that translates XYZ in another language. (Here XYZ stands for a +specific section name mentioned below, such as “Acknowledgements”, +“Dedications”, “Endorsements”, or “History”.) To “Preserve the Title” +of such a section when you modify the Document means that it remains a +section “Entitled XYZ” according to this definition. +</p> +<p>The Document may include Warranty Disclaimers next to the notice which +states that this License applies to the Document. These Warranty +Disclaimers are considered to be included by reference in this +License, but only as regards disclaiming warranties: any other +implication that these Warranty Disclaimers may have is void and has +no effect on the meaning of this License. +</p> +</li><li> VERBATIM COPYING + +<p>You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. +</p> +<p>You may also lend copies, under the same conditions stated above, and +you may publicly display copies. +</p> +</li><li> COPYING IN QUANTITY + +<p>If you publish printed copies (or copies in media that commonly have +printed covers) of the Document, numbering more than 100, and the +Document’s license notice requires Cover Texts, you must enclose the +copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. +</p> +<p>If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. +</p> +<p>If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a computer-network location from which the general network-using +public has access to download using public-standard network protocols +a complete Transparent copy of the Document, free of added material. +If you use the latter option, you must take reasonably prudent steps, +when you begin distribution of Opaque copies in quantity, to ensure +that this Transparent copy will remain thus accessible at the stated +location until at least one year after the last time you distribute an +Opaque copy (directly or through your agents or retailers) of that +edition to the public. +</p> +<p>It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. +</p> +</li><li> MODIFICATIONS + +<p>You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: +</p> +<ol> +<li> Use in the Title Page (and on the covers, if any) a title distinct +from that of the Document, and from those of previous versions +(which should, if there were any, be listed in the History section +of the Document). You may use the same title as a previous version +if the original publisher of that version gives permission. + +</li><li> List on the Title Page, as authors, one or more persons or entities +responsible for authorship of the modifications in the Modified +Version, together with at least five of the principal authors of the +Document (all of its principal authors, if it has fewer than five), +unless they release you from this requirement. + +</li><li> State on the Title page the name of the publisher of the +Modified Version, as the publisher. + +</li><li> Preserve all the copyright notices of the Document. + +</li><li> Add an appropriate copyright notice for your modifications +adjacent to the other copyright notices. + +</li><li> Include, immediately after the copyright notices, a license notice +giving the public permission to use the Modified Version under the +terms of this License, in the form shown in the Addendum below. + +</li><li> Preserve in that license notice the full lists of Invariant Sections +and required Cover Texts given in the Document’s license notice. + +</li><li> Include an unaltered copy of this License. + +</li><li> Preserve the section Entitled “History”, Preserve its Title, and add +to it an item stating at least the title, year, new authors, and +publisher of the Modified Version as given on the Title Page. If +there is no section Entitled “History” in the Document, create one +stating the title, year, authors, and publisher of the Document as +given on its Title Page, then add an item describing the Modified +Version as stated in the previous sentence. + +</li><li> Preserve the network location, if any, given in the Document for +public access to a Transparent copy of the Document, and likewise +the network locations given in the Document for previous versions +it was based on. These may be placed in the “History” section. +You may omit a network location for a work that was published at +least four years before the Document itself, or if the original +publisher of the version it refers to gives permission. + +</li><li> For any section Entitled “Acknowledgements” or “Dedications”, Preserve +the Title of the section, and preserve in the section all the +substance and tone of each of the contributor acknowledgements and/or +dedications given therein. + +</li><li> Preserve all the Invariant Sections of the Document, +unaltered in their text and in their titles. Section numbers +or the equivalent are not considered part of the section titles. + +</li><li> Delete any section Entitled “Endorsements”. Such a section +may not be included in the Modified Version. + +</li><li> Do not retitle any existing section to be Entitled “Endorsements” or +to conflict in title with any Invariant Section. + +</li><li> Preserve any Warranty Disclaimers. +</li></ol> + +<p>If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version’s license notice. +These titles must be distinct from any other section titles. +</p> +<p>You may add a section Entitled “Endorsements”, provided it contains +nothing but endorsements of your Modified Version by various +parties—for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. +</p> +<p>You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. +</p> +<p>The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. +</p> +</li><li> COMBINING DOCUMENTS + +<p>You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice, and that you preserve all their Warranty Disclaimers. +</p> +<p>The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. +</p> +<p>In the combination, you must combine any sections Entitled “History” +in the various original documents, forming one section Entitled +“History”; likewise combine any sections Entitled “Acknowledgements”, +and any sections Entitled “Dedications”. You must delete all +sections Entitled “Endorsements.” +</p> +</li><li> COLLECTIONS OF DOCUMENTS + +<p>You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. +</p> +<p>You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. +</p> +</li><li> AGGREGATION WITH INDEPENDENT WORKS + +<p>A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, is called an “aggregate” if the copyright +resulting from the compilation is not used to limit the legal rights +of the compilation’s users beyond what the individual works permit. +When the Document is included in an aggregate, this License does not +apply to the other works in the aggregate which are not themselves +derivative works of the Document. +</p> +<p>If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one half of +the entire aggregate, the Document’s Cover Texts may be placed on +covers that bracket the Document within the aggregate, or the +electronic equivalent of covers if the Document is in electronic form. +Otherwise they must appear on printed covers that bracket the whole +aggregate. +</p> +</li><li> TRANSLATION + +<p>Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License, and all the license notices in the +Document, and any Warranty Disclaimers, provided that you also include +the original English version of this License and the original versions +of those notices and disclaimers. In case of a disagreement between +the translation and the original version of this License or a notice +or disclaimer, the original version will prevail. +</p> +<p>If a section in the Document is Entitled “Acknowledgements”, +“Dedications”, or “History”, the requirement (section 4) to Preserve +its Title (section 1) will typically require changing the actual +title. +</p> +</li><li> TERMINATION + +<p>You may not copy, modify, sublicense, or distribute the Document +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense, or distribute it is void, and +will automatically terminate your rights under this License. +</p> +<p>However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. +</p> +<p>Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. +</p> +<p>Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, receipt of a copy of some or all of the same material does +not give you any rights to use it. +</p> +</li><li> FUTURE REVISIONS OF THIS LICENSE + +<p>The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +<a href="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</a>. +</p> +<p>Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License “or any later version” applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. If the Document +specifies that a proxy can decide which future versions of this +License can be used, that proxy’s public statement of acceptance of a +version permanently authorizes you to choose that version for the +Document. +</p> +</li><li> RELICENSING + +<p>“Massive Multiauthor Collaboration Site” (or “MMC Site”) means any +World Wide Web server that publishes copyrightable works and also +provides prominent facilities for anybody to edit those works. A +public wiki that anybody can edit is an example of such a server. A +“Massive Multiauthor Collaboration” (or “MMC”) contained in the +site means any set of copyrightable works thus published on the MMC +site. +</p> +<p>“CC-BY-SA” means the Creative Commons Attribution-Share Alike 3.0 +license published by Creative Commons Corporation, a not-for-profit +corporation with a principal place of business in San Francisco, +California, as well as future copyleft versions of that license +published by that same organization. +</p> +<p>“Incorporate” means to publish or republish a Document, in whole or +in part, as part of another Document. +</p> +<p>An MMC is “eligible for relicensing” if it is licensed under this +License, and if all works that were first published under this License +somewhere other than this MMC, and subsequently incorporated in whole +or in part into the MMC, (1) had no cover texts or invariant sections, +and (2) were thus incorporated prior to November 1, 2008. +</p> +<p>The operator of an MMC Site may republish an MMC contained in the site +under CC-BY-SA on the same site at any time before August 1, 2009, +provided the MMC is eligible for relicensing. +</p> +</li></ol> + +<a name="ADDENDUM_003a-How-to-use-this-License-for-your-documents"></a> +<h3 class="heading">ADDENDUM: How to use this License for your documents</h3> + +<p>To use this License in a document you have written, include a copy of +the License in the document and put the following copyright and +license notices just after the title page: +</p> +<div class="smallexample"> +<pre class="smallexample"> Copyright (C) <var>year</var> <var>your name</var>. + Permission is granted to copy, distribute and/or modify this document + 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, no Front-Cover Texts, and no Back-Cover + Texts. A copy of the license is included in the section entitled ``GNU + Free Documentation License''. +</pre></div> + +<p>If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, +replace the “with…Texts.” line with this: +</p> +<div class="smallexample"> +<pre class="smallexample"> with the Invariant Sections being <var>list their titles</var>, with + the Front-Cover Texts being <var>list</var>, and with the Back-Cover Texts + being <var>list</var>. +</pre></div> + +<p>If you have Invariant Sections without Cover Texts, or some other +combination of the three, merge those two alternatives to suit the +situation. +</p> +<p>If your document contains nontrivial examples of program code, we +recommend releasing these examples in parallel under your choice of +free software license, such as the GNU General Public License, +to permit their use in free software. +</p> + + +<hr> +<a name="Binutils-Index"></a> +<div class="header"> +<p> +Previous: <a href="#GNU-Free-Documentation-License" accesskey="p" rel="previous">GNU Free Documentation License</a>, Up: <a href="#Top" accesskey="u" rel="up">Top</a> [<a href="#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="#Binutils-Index" title="Index" rel="index">Index</a>]</p> +</div> +<a name="Binutils-Index-1"></a> +<h2 class="unnumbered">Binutils Index</h2> + +<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Binutils-Index_cp_symbol-1"><b>-</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_symbol-2"><b>.</b></a> + +<br> +<a class="summary-letter" href="#Binutils-Index_cp_letter-A"><b>A</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-B"><b>B</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-C"><b>C</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-D"><b>D</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-E"><b>E</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-F"><b>F</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-H"><b>H</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-I"><b>I</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-L"><b>L</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-M"><b>M</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-N"><b>N</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-O"><b>O</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-P"><b>P</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-Q"><b>Q</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-R"><b>R</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-S"><b>S</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-T"><b>T</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-U"><b>U</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-V"><b>V</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-W"><b>W</b></a> + +</td></tr></table> +<table class="index-cp" border="0"> +<tr><td></td><th align="left">Index Entry</th><td> </td><th align="left"> Section</th></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_symbol-1">-</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives">–enable-deterministic-archives</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-1">–enable-deterministic-archives</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-2">–enable-deterministic-archives</a>:</td><td> </td><td valign="top"><a href="#objcopy">objcopy</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-3">–enable-deterministic-archives</a>:</td><td> </td><td valign="top"><a href="#objcopy">objcopy</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-4">–enable-deterministic-archives</a>:</td><td> </td><td valign="top"><a href="#ranlib">ranlib</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-5">–enable-deterministic-archives</a>:</td><td> </td><td valign="top"><a href="#ranlib">ranlib</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-6">–enable-deterministic-archives</a>:</td><td> </td><td valign="top"><a href="#strip">strip</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-_002d_002denable_002ddeterministic_002darchives-7">–enable-deterministic-archives</a>:</td><td> </td><td valign="top"><a href="#strip">strip</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_symbol-2">.</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-_002estab">.stab</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-A">A</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-Add-prefix-to-absolute-paths">Add prefix to absolute paths</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-addr2line">addr2line</a>:</td><td> </td><td valign="top"><a href="#addr2line">addr2line</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-address-to-file-name-and-line-number">address to file name and line number</a>:</td><td> </td><td valign="top"><a href="#addr2line">addr2line</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-all-header-information_002c-object-file">all header information, object file</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ar">ar</a>:</td><td> </td><td valign="top"><a href="#ar">ar</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ar-compatibility"><code>ar</code> compatibility</a>:</td><td> </td><td valign="top"><a href="#ar">ar</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-architecture">architecture</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-architectures-available">architectures available</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-archive-contents">archive contents</a>:</td><td> </td><td valign="top"><a href="#ranlib">ranlib</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-Archive-file-symbol-index-information">Archive file symbol index information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-archive-headers">archive headers</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-archives">archives</a>:</td><td> </td><td valign="top"><a href="#ar">ar</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-B">B</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-base-files">base files</a>:</td><td> </td><td valign="top"><a href="#dlltool">dlltool</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-bug-criteria">bug criteria</a>:</td><td> </td><td valign="top"><a href="#Bug-Criteria">Bug Criteria</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-bug-reports">bug reports</a>:</td><td> </td><td valign="top"><a href="#Bug-Reporting">Bug Reporting</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-bugs">bugs</a>:</td><td> </td><td valign="top"><a href="#Reporting-Bugs">Reporting Bugs</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-bugs_002c-reporting">bugs, reporting</a>:</td><td> </td><td valign="top"><a href="#Bug-Reporting">Bug Reporting</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-C">C</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-c_002b_002bfilt">c++filt</a>:</td><td> </td><td valign="top"><a href="#c_002b_002bfilt">c++filt</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-changing-object-addresses">changing object addresses</a>:</td><td> </td><td valign="top"><a href="#objcopy">objcopy</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-changing-section-address">changing section address</a>:</td><td> </td><td valign="top"><a href="#objcopy">objcopy</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-changing-section-LMA">changing section LMA</a>:</td><td> </td><td valign="top"><a href="#objcopy">objcopy</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-changing-section-VMA">changing section VMA</a>:</td><td> </td><td valign="top"><a href="#objcopy">objcopy</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-changing-start-address">changing start address</a>:</td><td> </td><td valign="top"><a href="#objcopy">objcopy</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-collections-of-files">collections of files</a>:</td><td> </td><td valign="top"><a href="#ar">ar</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-Compact-Type-Format">Compact Type Format</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-Compact-Type-Format-1">Compact Type Format</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-compatibility_002c-ar">compatibility, <code>ar</code></a>:</td><td> </td><td valign="top"><a href="#ar">ar</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-contents-of-archive">contents of archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-crash">crash</a>:</td><td> </td><td valign="top"><a href="#Bug-Criteria">Bug Criteria</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-creating-archives">creating archives</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-creating-thin-archive">creating thin archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-CTF">CTF</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-CTF-1">CTF</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-cxxfilt">cxxfilt</a>:</td><td> </td><td valign="top"><a href="#c_002b_002bfilt">c++filt</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-D">D</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-dates-in-archive">dates in archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-debug-symbols">debug symbols</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-debugging-symbols">debugging symbols</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-deleting-from-archive">deleting from archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-demangling-C_002b_002b-symbols">demangling C++ symbols</a>:</td><td> </td><td valign="top"><a href="#c_002b_002bfilt">c++filt</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-demangling-in-nm">demangling in nm</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-demangling-in-nm-1">demangling in nm</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-demangling-in-objdump">demangling in objdump</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-demangling-in-objdump-1">demangling in objdump</a>:</td><td> </td><td valign="top"><a href="#addr2line">addr2line</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-deterministic-archives">deterministic archives</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-deterministic-archives-1">deterministic archives</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-deterministic-archives-2">deterministic archives</a>:</td><td> </td><td valign="top"><a href="#objcopy">objcopy</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-deterministic-archives-3">deterministic archives</a>:</td><td> </td><td valign="top"><a href="#objcopy">objcopy</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-deterministic-archives-4">deterministic archives</a>:</td><td> </td><td valign="top"><a href="#ranlib">ranlib</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-deterministic-archives-5">deterministic archives</a>:</td><td> </td><td valign="top"><a href="#ranlib">ranlib</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-deterministic-archives-6">deterministic archives</a>:</td><td> </td><td valign="top"><a href="#strip">strip</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-deterministic-archives-7">deterministic archives</a>:</td><td> </td><td valign="top"><a href="#strip">strip</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-disassembling-object-code">disassembling object code</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-disassembly-architecture">disassembly architecture</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-disassembly-endianness">disassembly endianness</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-disassembly_002c-with-source">disassembly, with source</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-disassembly_002c-with-source-1">disassembly, with source</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-discarding-symbols">discarding symbols</a>:</td><td> </td><td valign="top"><a href="#strip">strip</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-DLL">DLL</a>:</td><td> </td><td valign="top"><a href="#dlltool">dlltool</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-dlltool">dlltool</a>:</td><td> </td><td valign="top"><a href="#dlltool">dlltool</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-dynamic-relocation-entries_002c-in-object-file">dynamic relocation entries, in object file</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-dynamic-symbol-table-entries_002c-printing">dynamic symbol table entries, printing</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-dynamic-symbols">dynamic symbols</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-E">E</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-dynamic-section-information">ELF dynamic section information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-dynamic-symbol-table-information">ELF dynamic symbol table information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-file-header-information">ELF file header information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-file-information">ELF file information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-notes">ELF notes</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-object-file-format">ELF object file format</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-program-header-information">ELF program header information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-reloc-information">ELF reloc information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-section-group-information">ELF section group information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-section-information">ELF section information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-section-information-1">ELF section information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-segment-information">ELF segment information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-symbol-table-information">ELF symbol table information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ELF-version-sections-information">ELF version sections information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-elfedit">elfedit</a>:</td><td> </td><td valign="top"><a href="#elfedit">elfedit</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-endianness">endianness</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-error-on-valid-input">error on valid input</a>:</td><td> </td><td valign="top"><a href="#Bug-Criteria">Bug Criteria</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-external-symbols">external symbols</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-external-symbols-1">external symbols</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-external-symbols-2">external symbols</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-extract-from-archive">extract from archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-F">F</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-fatal-signal">fatal signal</a>:</td><td> </td><td valign="top"><a href="#Bug-Criteria">Bug Criteria</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-file-name">file name</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-H">H</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-header-information_002c-all">header information, all</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-I">I</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-input-_002edef-file">input .def file</a>:</td><td> </td><td valign="top"><a href="#dlltool">dlltool</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-input-file-name">input file name</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-Instruction-width">Instruction width</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-L">L</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-libraries">libraries</a>:</td><td> </td><td valign="top"><a href="#ar">ar</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-listings-strings">listings strings</a>:</td><td> </td><td valign="top"><a href="#strings">strings</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-LTO-symbol-table">LTO symbol table</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-M">M</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-machine-instructions">machine instructions</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-moving-in-archive">moving in archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-MRI-compatibility_002c-ar">MRI compatibility, <code>ar</code></a>:</td><td> </td><td valign="top"><a href="#ar-scripts">ar scripts</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-N">N</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-name-duplication-in-archive">name duplication in archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-name-length">name length</a>:</td><td> </td><td valign="top"><a href="#ar">ar</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-nm">nm</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-nm-compatibility"><code>nm</code> compatibility</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-nm-compatibility-1"><code>nm</code> compatibility</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-nm-format"><code>nm</code> format</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-nm-format-1"><code>nm</code> format</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-not-writing-archive-index">not writing archive index</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-O">O</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-objdump">objdump</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-objdump-inlines">objdump inlines</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-object-code-format">object code format</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-object-code-format-1">object code format</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-object-code-format-2">object code format</a>:</td><td> </td><td valign="top"><a href="#size">size</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-object-code-format-3">object code format</a>:</td><td> </td><td valign="top"><a href="#strings">strings</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-object-code-format-4">object code format</a>:</td><td> </td><td valign="top"><a href="#addr2line">addr2line</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-object-file-header">object file header</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-object-file-information">object file information</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-object-file-offsets">object file offsets</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-object-file-sections">object file sections</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-object-formats-available">object formats available</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-offsets-of-files">offsets of files</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-operations-on-archive">operations on archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-P">P</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-plugins">plugins</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-plugins-1">plugins</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-printing-from-archive">printing from archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-printing-strings">printing strings</a>:</td><td> </td><td valign="top"><a href="#strings">strings</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-Q">Q</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-quick-append-to-archive">quick append to archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-quiet">quiet</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-R">R</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-radix-for-section-sizes">radix for section sizes</a>:</td><td> </td><td valign="top"><a href="#size">size</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ranlib-1">ranlib</a>:</td><td> </td><td valign="top"><a href="#ranlib">ranlib</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-ranlib">ranlib</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-readelf">readelf</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-relative-placement-in-archive">relative placement in archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-relocation-entries_002c-in-object-file">relocation entries, in object file</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-removing-symbols">removing symbols</a>:</td><td> </td><td valign="top"><a href="#strip">strip</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-repeated-names-in-archive">repeated names in archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-replacement-in-archive">replacement in archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-reporting-bugs">reporting bugs</a>:</td><td> </td><td valign="top"><a href="#Reporting-Bugs">Reporting Bugs</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-S">S</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-scripts_002c-ar">scripts, <code>ar</code></a>:</td><td> </td><td valign="top"><a href="#ar-scripts">ar scripts</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-section-addresses-in-objdump">section addresses in objdump</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-section-headers">section headers</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-section-information">section information</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-section-sizes">section sizes</a>:</td><td> </td><td valign="top"><a href="#size">size</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-sections_002c-full-contents">sections, full contents</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-separate-debug-files">separate debug files</a>:</td><td> </td><td valign="top"><a href="#debuginfod">debuginfod</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-SFrame">SFrame</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-size">size</a>:</td><td> </td><td valign="top"><a href="#size">size</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-size-display-format"><code>size</code> display format</a>:</td><td> </td><td valign="top"><a href="#size">size</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-size-number-format"><code>size</code> number format</a>:</td><td> </td><td valign="top"><a href="#size">size</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-sorting-symbols">sorting symbols</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-source-code-context">source code context</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-source-disassembly">source disassembly</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-source-disassembly-1">source disassembly</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-source-file-name">source file name</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-source-filenames-for-object-files">source filenames for object files</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-stab">stab</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-start_002daddress">start-address</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-stop_002daddress">stop-address</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-strings">strings</a>:</td><td> </td><td valign="top"><a href="#strings">strings</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-strings_002c-printing">strings, printing</a>:</td><td> </td><td valign="top"><a href="#strings">strings</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-strip">strip</a>:</td><td> </td><td valign="top"><a href="#strip">strip</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-Strip-absolute-paths">Strip absolute paths</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-symbol-index">symbol index</a>:</td><td> </td><td valign="top"><a href="#ar">ar</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-symbol-index-1">symbol index</a>:</td><td> </td><td valign="top"><a href="#ranlib">ranlib</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-symbol-index_002c-listing">symbol index, listing</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-symbol-line-numbers">symbol line numbers</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-symbol-table-entries_002c-printing">symbol table entries, printing</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-symbol-table-size-base">symbol table size base</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-symbols">symbols</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-symbols_002c-discarding">symbols, discarding</a>:</td><td> </td><td valign="top"><a href="#strip">strip</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-T">T</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-thin-archives">thin archives</a>:</td><td> </td><td valign="top"><a href="#ar">ar</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-U">U</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-undefined-symbols">undefined symbols</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-undefined-symbols-1">undefined symbols</a>:</td><td> </td><td valign="top"><a href="#nm">nm</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-Unix-compatibility_002c-ar">Unix compatibility, <code>ar</code></a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-unwind-information">unwind information</a>:</td><td> </td><td valign="top"><a href="#readelf">readelf</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-Update-ELF-header">Update ELF header</a>:</td><td> </td><td valign="top"><a href="#elfedit">elfedit</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-updating-an-archive">updating an archive</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-V">V</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-version">version</a>:</td><td> </td><td valign="top"><a href="#Top">Top</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-VMA-in-objdump">VMA in objdump</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +<tr><th><a name="Binutils-Index_cp_letter-W">W</a></th><td></td><td></td></tr> +<tr><td></td><td valign="top"><a href="#index-wide-output_002c-printing">wide output, printing</a>:</td><td> </td><td valign="top"><a href="#objdump">objdump</a></td></tr> +<tr><td></td><td valign="top"><a href="#index-writing-archive-index">writing archive index</a>:</td><td> </td><td valign="top"><a href="#ar-cmdline">ar cmdline</a></td></tr> +<tr><td colspan="4"> <hr></td></tr> +</table> +<table><tr><th valign="top">Jump to: </th><td><a class="summary-letter" href="#Binutils-Index_cp_symbol-1"><b>-</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_symbol-2"><b>.</b></a> + +<br> +<a class="summary-letter" href="#Binutils-Index_cp_letter-A"><b>A</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-B"><b>B</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-C"><b>C</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-D"><b>D</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-E"><b>E</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-F"><b>F</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-H"><b>H</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-I"><b>I</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-L"><b>L</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-M"><b>M</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-N"><b>N</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-O"><b>O</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-P"><b>P</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-Q"><b>Q</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-R"><b>R</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-S"><b>S</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-T"><b>T</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-U"><b>U</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-V"><b>V</b></a> + +<a class="summary-letter" href="#Binutils-Index_cp_letter-W"><b>W</b></a> + +</td></tr></table> + +<div class="footnote"> +<hr> +<h4 class="footnotes-heading">Footnotes</h4> + +<h3><a name="FOOT1" href="#DOCF1">(1)</a></h3> +<p>MS-DOS does not allow <kbd>+</kbd> characters in file names, so on +MS-DOS this program is named <code>CXXFILT</code>.</p> +</div> +<hr> + + + +</body> +</html> |