home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-02 | 65.9 KB | 1,775 lines |
- <HTML>
- <HEAD>
- <!-- This HTML file has been created by TEXI.HTM 1.31
- from /usr/src/devel/binutils-2.5.2l.17/binutils/binutils.texi on 9 June 1995 -->
-
- <TITLE>The GNU Binary Utilities</TITLE>
- </HEAD>
- <BODY>
- <H1>The GNU Binary Utilities</H1>
- <H1><A NAME="SEC1" HREF="BINUTILS.HTM#SEC1">ar</A></H1>
- <A NAME="IDX1"></A>
- <A NAME="IDX2"></A>
- <A NAME="IDX3"></A>
- <P>
- <PRE>
- ar [-]<VAR>p</VAR>[<VAR>mod</VAR> [<VAR>relpos</VAR>]] <VAR>archive</VAR> [<VAR>member</VAR>...]
- ar -M [ <mri-script ]
- </PRE>
- <P>
- The GNU <CODE>ar</CODE> program creates, modifies, and extracts from
- archives. An <DFN>archive</DFN> is a single file holding a collection of
- other files in a structure that makes it possible to retrieve
- the original individual files (called <DFN>members</DFN> of the archive).
- <P>
- The original files' contents, mode (permissions), timestamp, owner, and
- group are preserved in the archive, and can be restored on
- extraction.
- <A NAME="IDX4"></A>
- <P>
- GNU <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).
- <A NAME="IDX5"></A>
- <P>
- <CODE>ar</CODE> is considered a binary utility because archives of this sort
- are most often used as <DFN>libraries</DFN> holding commonly needed
- subroutines.
- <A NAME="IDX6"></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>
- 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.
- <A NAME="IDX7"></A>
- <A NAME="IDX8"></A>
- <P>
- GNU <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>
- <H2><A NAME="SEC2" HREF="BINUTILS.HTM#SEC2">Controlling <CODE>ar</CODE> on the command line</A></H2>
- <P>
- <PRE>
- ar [-]<VAR>p</VAR>[<VAR>mod</VAR> [<VAR>relpos</VAR>]] <VAR>archive</VAR> [<VAR>member</VAR>...]
- </PRE>
- <A NAME="IDX9"></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>
- Most operations can also accept further <VAR>member</VAR> arguments,
- specifying particular files to operate on.
- <P>
- GNU <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>
- If you wish, you may begin the first command-line argument with a
- dash.
- <A NAME="IDX10"></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>
- <A NAME="IDX11"></A>
- <DT><CODE>d</CODE>
- <DD><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.
-
- If you specify the <SAMP>`v'</SAMP> modifier, <CODE>ar</CODE> lists each module
- as it is deleted.
-
- <A NAME="IDX12"></A>
- <DT><CODE>m</CODE>
- <DD>Use this operation to <EM>move</EM> members in an archive.
-
- 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.
-
- 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.
-
- <A NAME="IDX13"></A>
- <DT><CODE>p</CODE>
- <DD><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.
-
- If you specify no <VAR>member</VAR> arguments, all the files in the archive are
- printed.
-
- <A NAME="IDX14"></A>
- <DT><CODE>q</CODE>
- <DD><EM>Quick append</EM>; add the files <VAR>member</VAR>... to the end of
- <VAR>archive</VAR>, without checking for replacement.
-
- 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.
-
- The modifier <SAMP>`v'</SAMP> makes <CODE>ar</CODE> list each file as it is appended.
-
- Since the point of this operation is speed, the archive's symbol table
- index is not updated, even if it already existed; you can use <SAMP>`ar s'</SAMP> or
- <CODE>ranlib</CODE> explicitly to update the symbol table index.
-
- <A NAME="IDX15"></A>
- <DT><CODE>r</CODE>
- <DD>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.
-
- 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.
-
- 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.
-
- 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.
-
- <A NAME="IDX16"></A>
- <DT><CODE>t</CODE>
- <DD>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; if you also want to
- see the modes (permissions), timestamp, owner, group, and size, you can
- request that by also specifying the <SAMP>`v'</SAMP> modifier.
-
- If you do not specify a <VAR>member</VAR>, all files in the archive
- are listed.
-
- <A NAME="IDX18"></A>
- <A NAME="IDX17"></A>
- 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>.
-
- <A NAME="IDX19"></A>
- <DT><CODE>x</CODE>
- <DD><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.
-
- If you do not specify a <VAR>member</VAR>, all files in the archive
- are extracted.
-
- </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>
- <A NAME="IDX20"></A>
- <DT><CODE>a</CODE>
- <DD>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.
-
- <DT><CODE>b</CODE>
- <DD>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>).
-
- <A NAME="IDX21"></A>
- <DT><CODE>c</CODE>
- <DD><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.
-
- <DT><CODE>i</CODE>
- <DD>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>).
-
- <DT><CODE>l</CODE>
- <DD>This modifier is accepted but not used.
-
- <A NAME="IDX22"></A>
- <DT><CODE>o</CODE>
- <DD>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.
-
- <A NAME="IDX23"></A>
- <DT><CODE>s</CODE>
- <DD>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.
-
- <A NAME="IDX24"></A>
- <DT><CODE>u</CODE>
- <DD>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>.
-
- <DT><CODE>v</CODE>
- <DD>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.
-
- <DT><CODE>V</CODE>
- <DD>This modifier shows the version number of <CODE>ar</CODE>.
- </DL>
- <P>
- <H2><A NAME="SEC3" HREF="BINUTILS.HTM#SEC3">Controlling <CODE>ar</CODE> with a script</A></H2>
- <P>
- <PRE>
- ar -M [ <<VAR>script</VAR> ]
- </PRE>
- <A NAME="IDX25"></A>
- <A NAME="IDX26"></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>
- 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 GNU <CODE>ar</CODE> for developers who already have scripts
- written for the MRI "librarian" program.
- <P>
- The syntax for the <CODE>ar</CODE> command language is straightforward:
- <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>
- a single command may appear on each line; it is the first word on the
- line.
-
- <LI>
- empty lines are allowed, and have no effect.
-
- <LI>
- comments are allowed; text after either of the characters <SAMP>`*'</SAMP>
- or <SAMP>`;'</SAMP> is ignored.
-
- <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>
- <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.
- </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>
- <CODE>OPEN</CODE> or <CODE>CREATE</CODE> specify a <DFN>current archive</DFN>, which is
- a temporary file required for most of the other commands.
- <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>
- <DT><CODE>ADDLIB <VAR>archive</VAR></CODE>
- <DD><DT><CODE>ADDLIB <VAR>archive</VAR> (<VAR>module</VAR>, <VAR>module</VAR>, ... <VAR>module</VAR>)</CODE>
- <DD>Add all the contents of <VAR>archive</VAR> (or, if specified, each named
- <VAR>module</VAR> from <VAR>archive</VAR>) to the current archive.
-
- Requires prior use of <CODE>OPEN</CODE> or <CODE>CREATE</CODE>.
-
- <DT><CODE>ADDMOD <VAR>member</VAR>, <VAR>member</VAR>, ... <VAR>member</VAR></CODE>
- <DD>Add each named <VAR>member</VAR> as a module in the current archive.
-
- Requires prior use of <CODE>OPEN</CODE> or <CODE>CREATE</CODE>.
-
- <DT><CODE>CLEAR</CODE>
- <DD>Discard the contents of the current archive, cancelling the effect of
- any operations since the last <CODE>SAVE</CODE>. May be executed (with no
- effect) even if no current archive is specified.
-
- <DT><CODE>CREATE <VAR>archive</VAR></CODE>
- <DD>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>.
-
- <DT><CODE>DELETE <VAR>module</VAR>, <VAR>module</VAR>, ... <VAR>module</VAR></CODE>
- <DD>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>.
-
- Requires prior use of <CODE>OPEN</CODE> or <CODE>CREATE</CODE>.
-
- <DT><CODE>DIRECTORY <VAR>archive</VAR> (<VAR>module</VAR>, ... <VAR>module</VAR>)</CODE>
- <DD><DT><CODE>DIRECTORY <VAR>archive</VAR> (<VAR>module</VAR>, ... <VAR>module</VAR>) <VAR>outputfile</VAR></CODE>
- <DD>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>.
-
- 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.
-
- <DT><CODE>END</CODE>
- <DD>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.
-
- <DT><CODE>EXTRACT <VAR>module</VAR>, <VAR>module</VAR>, ... <VAR>module</VAR></CODE>
- <DD>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>.
-
- Requires prior use of <CODE>OPEN</CODE> or <CODE>CREATE</CODE>.
-
-
- <DT><CODE>LIST</CODE>
- <DD>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 GNU <CODE>ld</CODE>
- enhancement, rather than present for MRI compatibility.)
-
- Requires prior use of <CODE>OPEN</CODE> or <CODE>CREATE</CODE>.
-
- <DT><CODE>OPEN <VAR>archive</VAR></CODE>
- <DD>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>.
-
- <DT><CODE>REPLACE <VAR>module</VAR>, <VAR>module</VAR>, ... <VAR>module</VAR></CODE>
- <DD>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.
-
- Requires prior use of <CODE>OPEN</CODE> or <CODE>CREATE</CODE>.
-
- <DT><CODE>VERBOSE</CODE>
- <DD>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>....
-
- <DT><CODE>SAVE</CODE>
- <DD>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.
-
- Requires prior use of <CODE>OPEN</CODE> or <CODE>CREATE</CODE>.
-
- </DL>
- <P>
- <A NAME="IDX27"></A>
- <A NAME="IDX28"></A>
- <H1><A NAME="SEC4" HREF="BINUTILS.HTM#SEC4">ld</A></H1>
- The GNU linker <CODE>ld</CODE> is now described in a separate manual.
- See section `Overview' in <CITE>Using LD: the GNU linker</CITE>.
- <P>
- <A NAME="IDX29"></A>
- <A NAME="IDX30"></A>
- <H1><A NAME="SEC5" HREF="BINUTILS.HTM#SEC5">nm</A></H1>
- <P>
- <PRE>
- nm [ -a | --debug-syms ] [ -g | --extern-only ]
- [ -B ] [ -C | --demangle ] [ -D | --dynamic ]
- [ -s | --print-armap ] [ -A | -o | --print-file-name ]
- [ -n | -v | --numeric-sort ] [ -p | --no-sort ]
- [ -r | --reverse-sort ] [ --size-sort ] [ -u | --undefined-only ]
- [ -t <VAR>radix</VAR> | --radix=<VAR>radix</VAR> ] [ -P | --portability ]
- [ --target=<VAR>bfdname</VAR> ] [ -f <VAR>format</VAR> | --format=<VAR>format</VAR> ]
- [ --no-demangle ] [ -V | --version ] [ --help ] [ <VAR>objfile</VAR>... ]
- </PRE>
- <P>
- GNU <CODE>nm</CODE> lists the symbols from object files <VAR>objfile</VAR>....
- If no object files are listed as arguments, <CODE>nm</CODE> assumes
- <TT>`a.out'</TT>.
- <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>
- The symbol type. At least the following types are used; others are, as
- well, depending on the object file format. If lowercase, the symbol is
- local; if uppercase, the symbol is global (external).
-
- <DL COMPACT>
- <DT><CODE>A</CODE>
- <DD>Absolute.
-
- <DT><CODE>B</CODE>
- <DD>BSS (uninitialized data).
-
- <DT><CODE>C</CODE>
- <DD>Common.
-
- <DT><CODE>D</CODE>
- <DD>Initialized data.
-
- <DT><CODE>I</CODE>
- <DD>Indirect reference.
-
- <DT><CODE>T</CODE>
- <DD>Text (program code).
-
- <DT><CODE>U</CODE>
- <DD>Undefined.
- </DL>
-
- <LI>
- The symbol name.
- </UL>
- <P>
- The long and short forms of options, shown here as alternatives, are
- equivalent.
- <P>
- <DL COMPACT>
- <DT><CODE>-A</CODE>
- <DD><DT><CODE>-o</CODE>
- <DD><A NAME="IDX31"></A>
- <A NAME="IDX32"></A>
- <A NAME="IDX33"></A>
- <DT><CODE>--print-file-name</CODE>
- <DD>Precede each symbol by the name of the input file (or archive element)
- in which it was found, rather than identifying the input file once only,
- before all of its symbols.
-
- <DT><CODE>-a</CODE>
- <DD><A NAME="IDX34"></A>
- <DT><CODE>--debug-syms</CODE>
- <DD>Display all symbols, even debugger-only symbols; normally these are not
- listed.
-
- <A NAME="IDX35"></A>
- <A NAME="IDX36"></A>
- <DT><CODE>-B</CODE>
- <DD>The same as <SAMP>`--format=bsd'</SAMP> (for compatibility with the MIPS <CODE>nm</CODE>).
-
- <DT><CODE>-C</CODE>
- <DD><A NAME="IDX37"></A>
- <DT><CODE>--demangle</CODE>
- <DD>Decode (<DFN>demangle</DFN>) low-level symbol names into user-level names.
- Besides removing any initial underscore prepended by the system, this
- makes C++ function names readable. See section <A HREF="BINUTILS.000#SEC12">c++filt</A>, for more information
- on demangling.
-
- <DT><CODE>--no-demangle</CODE>
- <DD>Do not demangle low-level symbol names. This is the default.
-
- <DT><CODE>-D</CODE>
- <DD><A NAME="IDX38"></A>
- <DT><CODE>--dynamic</CODE>
- <DD>Display the dynamic symbols rather than the normal symbols. This is
- only meaningful for dynamic objects, such as certain types of shared
- libraries.
-
- <DT><CODE>-f <VAR>format</VAR></CODE>
- <DD><A NAME="IDX39"></A>
- <A NAME="IDX40"></A>
- <DT><CODE>--format=<VAR>format</VAR></CODE>
- <DD>Use the output format <VAR>format</VAR>, which can be <CODE>bsd</CODE>,
- <CODE>sysv</CODE>, or <CODE>posix</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.
-
- <DT><CODE>-g</CODE>
- <DD><A NAME="IDX41"></A>
- <DT><CODE>--extern-only</CODE>
- <DD>Display only external symbols.
-
- <DT><CODE>-n</CODE>
- <DD><DT><CODE>-v</CODE>
- <DD><DT><CODE>--numeric-sort</CODE>
- <DD>Sort symbols numerically by their addresses, rather than alphabetically
- by their names.
-
- <DT><CODE>-p</CODE>
- <DD><A NAME="IDX42"></A>
- <DT><CODE>--no-sort</CODE>
- <DD>Do not bother to sort the symbols in any order; print them in the order
- encountered.
-
- <DT><CODE>-P</CODE>
- <DD><DT><CODE>--portability</CODE>
- <DD>Use the POSIX.2 standard output format instead of the default format.
- Equivalent to <SAMP>`-f posix'</SAMP>.
-
- <DT><CODE>-s</CODE>
- <DD><A NAME="IDX43"></A>
- <DT><CODE>--print-armap</CODE>
- <DD>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.
-
- <DT><CODE>-r</CODE>
- <DD><DT><CODE>--reverse-sort</CODE>
- <DD>Reverse the order of the sort (whether numeric or alphabetic); let the
- last come first.
-
- <DT><CODE>--size-sort</CODE>
- <DD>Sort symbols by size. The size is computed as the difference between
- the value of the symbol and the value of the symbol with the next higher
- value. The size of the symbol is printed, rather than the value.
-
- <DT><CODE>-t <VAR>radix</VAR></CODE>
- <DD><DT><CODE>--radix=<VAR>radix</VAR></CODE>
- <DD>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.
-
- <A NAME="IDX44"></A>
- <DT><CODE>--target=<VAR>bfdname</VAR></CODE>
- <DD>Specify an object code format other than your system's default format.
- See section <A HREF="BINUTILS.000#SEC15">Target Selection</A>, for more information.
-
- <DT><CODE>-u</CODE>
- <DD><A NAME="IDX45"></A>
- <A NAME="IDX46"></A>
- <DT><CODE>--undefined-only</CODE>
- <DD>Display only undefined symbols (those external to each object file).
-
- <DT><CODE>-V</CODE>
- <DD><DT><CODE>--version</CODE>
- <DD>Show the version number of <CODE>nm</CODE> and exit.
-
- <DT><CODE>--help</CODE>
- <DD>Show a summary of the options to <CODE>nm</CODE> and exit.
- </DL>
- <P>
- <H1><A NAME="SEC6" HREF="BINUTILS.HTM#SEC6">objcopy</A></H1>
- <P>
- <PRE>
- objcopy [ -F <VAR>bfdname</VAR> | --target=<VAR>bfdname</VAR> ]
- [ -I <VAR>bfdname</VAR> | --input-target=<VAR>bfdname</VAR> ]
- [ -O <VAR>bfdname</VAR> | --output-target=<VAR>bfdname</VAR> ]
- [ -S | --strip-all ] [ -g | --strip-debug ]
- [ -K <VAR>symbolname</VAR> | --keep-symbol=<VAR>symbolname</VAR> ]
- [ -N <VAR>symbolname</VAR> | --strip-symbol=<VAR>symbolname</VAR> ]
- [ -x | --discard-all ] [ -X | --discard-locals ]
- [ -b <VAR>byte</VAR> | --byte=<VAR>byte</VAR> ]
- [ -i <VAR>interleave</VAR> | --interleave=<VAR>interleave</VAR> ]
- [ -R <VAR>sectionname</VAR> | --remove-section=<VAR>sectionname</VAR> ]
- [ --gap-fill=<VAR>val</VAR> ] [ --pad-to=<VAR>address</VAR> ]
- [ --set-start=<VAR>val</VAR> ] [ --adjust-start=<VAR>incr</VAR> ]
- [ --adjust-vma=<VAR>incr</VAR> ]
- [ --adjust-section-vma=<VAR>section</VAR>{=,+,-}<VAR>val</VAR> ]
- [ --adjust-warnings ] [ --no-adjust-warnings ]
- [ --set-section-flags=<VAR>section</VAR>=<VAR>flags</VAR> ]
- [ --add-section=<VAR>sectionname</VAR>=<VAR>filename</VAR> ]
- [ -v | --verbose ] [ -V | --version ] [ --help ]
- <VAR>infile</VAR> [<VAR>outfile</VAR>]
- </PRE>
- <P>
- The GNU <CODE>objcopy</CODE> utility copies the contents of an object
- file to another. <CODE>objcopy</CODE> uses the GNU BFD 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.
- <P>
- <CODE>objcopy</CODE> creates temporary files to do its translations and
- deletes them afterward. <CODE>objcopy</CODE> uses BFD to do all its
- translation work; it has access to all the formats described in BFD
- and thus is able to recognize most formats without being told
- explicitly. See section `BFD' in <CITE>Using LD</CITE>.
- <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>
- <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 virtual address of the lowest section copied into the output file.
- <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 which is not needed by the binary file.
- <P>
- <DL COMPACT>
- <DT><CODE><VAR>infile</VAR></CODE>
- <DD><DT><CODE><VAR>outfile</VAR></CODE>
- <DD>The source 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>.
-
- <DT><CODE>-I <VAR>bfdname</VAR></CODE>
- <DD><DT><CODE>--input-target=<VAR>bfdname</VAR></CODE>
- <DD>Consider the source file's object format to be <VAR>bfdname</VAR>, rather than
- attempting to deduce it. See section <A HREF="BINUTILS.000#SEC15">Target Selection</A>, for more information.
-
- <DT><CODE>-O <VAR>bfdname</VAR></CODE>
- <DD><DT><CODE>--output-target=<VAR>bfdname</VAR></CODE>
- <DD>Write the output file using the object format <VAR>bfdname</VAR>.
- See section <A HREF="BINUTILS.000#SEC15">Target Selection</A>, for more information.
-
- <DT><CODE>-F <VAR>bfdname</VAR></CODE>
- <DD><DT><CODE>--target=<VAR>bfdname</VAR></CODE>
- <DD>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 section <A HREF="BINUTILS.000#SEC15">Target Selection</A>, for more information.
-
- <DT><CODE>-R <VAR>sectionname</VAR></CODE>
- <DD><DT><CODE>--remove-section=<VAR>sectionname</VAR></CODE>
- <DD>Remove any section named <VAR>sectionname</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.
-
- <DT><CODE>-S</CODE>
- <DD><DT><CODE>--strip-all</CODE>
- <DD>Do not copy relocation and symbol information from the source file.
-
- <DT><CODE>-g</CODE>
- <DD><DT><CODE>--strip-debug</CODE>
- <DD>Do not copy debugging symbols from the source file.
-
- <DT><CODE>-K <VAR>symbolname</VAR></CODE>
- <DD><DT><CODE>--keep-symbol=<VAR>symbolname</VAR></CODE>
- <DD>Copy only symbol <VAR>symbolname</VAR> from the source file. This option may
- be given more than once.
-
- <DT><CODE>-N <VAR>symbolname</VAR></CODE>
- <DD><DT><CODE>--strip-symbol=<VAR>symbolname</VAR></CODE>
- <DD>Do not copy 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 <CODE>-K</CODE>.
-
- <DT><CODE>-x</CODE>
- <DD><DT><CODE>--discard-all</CODE>
- <DD>Do not copy non-global symbols from the source file.
-
- <DT><CODE>-X</CODE>
- <DD><DT><CODE>--discard-locals</CODE>
- <DD>Do not copy compiler-generated local symbols.
- (These usually start with <SAMP>`L'</SAMP> or <SAMP>`.'</SAMP>.)
-
- <DT><CODE>-b <VAR>byte</VAR></CODE>
- <DD><DT><CODE>--byte=<VAR>byte</VAR></CODE>
- <DD>Keep only every <VAR>byte</VAR>th byte of the input file (header data is not
- affected). <VAR>byte</VAR> can be in the range from 0 to <VAR>interleave</VAR>-1,
- where <VAR>interleave</VAR> is given by the <SAMP>`-i'</SAMP> or <SAMP>`--interleave'</SAMP>
- option, or the default of 4. This option is useful for creating files
- to program ROM. It is typically used with an <CODE>srec</CODE> output
- target.
-
- <DT><CODE>-i <VAR>interleave</VAR></CODE>
- <DD><DT><CODE>--interleave=<VAR>interleave</VAR></CODE>
- <DD>Only copy one out of every <VAR>interleave</VAR> bytes. Select which byte to
- copy with the <VAR>-b</VAR> or <SAMP>`--byte'</SAMP> option. The default is 4.
- <CODE>objcopy</CODE> ignores this option if you do not specify either <SAMP>`-b'</SAMP> or
- <SAMP>`--byte'</SAMP>.
-
- <DT><CODE>--gap-fill <VAR>val</VAR></CODE>
- <DD>Fill gaps between sections with <VAR>val</VAR>. This is done by increasing
- the size of the section with the lower address, and filling in the extra
- space created with <VAR>val</VAR>.
-
- <DT><CODE>--pad-to <VAR>address</VAR></CODE>
- <DD>Pad the output file up to the virtual 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).
-
- <DT><CODE>--set-start <VAR>val</VAR></CODE>
- <DD>Set the address of the new file to <VAR>val</VAR>. Not all object file
- formats support setting the start address.
-
- <DT><CODE>--adjust-start <VAR>incr</VAR></CODE>
- <DD>Adjust the start address by adding <VAR>incr</VAR>. Not all object file
- formats support setting the start address.
-
- <DT><CODE>--adjust-vma <VAR>incr</VAR></CODE>
- <DD>Adjust the address 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.
-
- <DT><CODE>--adjust-section-vma <VAR>section</VAR>{=,+,-}<VAR>val</VAR></CODE>
- <DD>Set or adjust the address of the named <VAR>section</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>`--adjust-vma'</SAMP>, above. If <VAR>section</VAR> does not exist in the
- input file, a warning will be issued, unless <SAMP>`--no-adjust-warnings'</SAMP>
- is used.
-
- <DT><CODE>--adjust-warnings</CODE>
- <DD>If <SAMP>`--adjust-section-vma'</SAMP> is used, and the named section does not
- exist, issue a warning. This is the default.
-
- <DT><CODE>--no-adjust-warnings</CODE>
- <DD>Do not issue a warning if <SAMP>`--adjust-section-vma'</SAMP> is used, even if
- the named section does not exist.
-
- <DT><CODE>--set-section-flags <VAR>section</VAR>=<VAR>flags</VAR></CODE>
- <DD>Set the flags for the named section. The <VAR>flags</VAR> argument is a
- comma separated string of flag names. The recognized names are
- <SAMP>`alloc'</SAMP>, <SAMP>`load'</SAMP>, <SAMP>`readonly'</SAMP>, <SAMP>`code'</SAMP>, <SAMP>`data'</SAMP>,
- and <SAMP>`rom'</SAMP>. Not all flags are meaningful for all object file
- formats.
-
- <DT><CODE>--add-section <VAR>sectionname</VAR>=<VAR>filename</VAR></CODE>
- <DD>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.
-
- <DT><CODE>-V</CODE>
- <DD><DT><CODE>--version</CODE>
- <DD>Show the version number of <CODE>objcopy</CODE>.
-
- <DT><CODE>-v</CODE>
- <DD><DT><CODE>--verbose</CODE>
- <DD>Verbose output: list all object files modified. In the case of
- archives, <SAMP>`objcopy -V'</SAMP> lists all members of the archive.
-
- <DT><CODE>--help</CODE>
- <DD>Show a summary of the options to <CODE>objcopy</CODE>.
- </DL>
- <P>
- <H1><A NAME="SEC7" HREF="BINUTILS.HTM#SEC7">objdump</A></H1>
- <A NAME="IDX47"></A>
- <A NAME="IDX48"></A>
- <P>
- <PRE>
- objdump [ -a | --archive-headers ]
- [ -b <VAR>bfdname</VAR> | --target=<VAR>bfdname</VAR> ]
- [ -d | --disassemble ] [ -D | --disassemble-all ]
- [ -f | --file-headers ]
- [ -h | --section-headers | --headers ] [ -i | --info ]
- [ -j <VAR>section</VAR> | --section=<VAR>section</VAR> ]
- [ -l | --line-numbers ] [ -S | --source ]
- [ -m <VAR>machine</VAR> | --architecture=<VAR>machine</VAR> ]
- [ -r | --reloc ] [ -R | --dynamic-reloc ]
- [ -s | --full-contents ] [ --stabs ]
- [ -t | --syms ] [ -T | --dynamic-syms ] [ -x | --all-headers ]
- [ --version ] [ --help ] <VAR>objfile</VAR>...
- </PRE>
- <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>
- <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>
- The long and short forms of options, shown here as alternatives, are
- equivalent. At least one option besides <SAMP>`-l'</SAMP> must be given.
- <P>
- <DL COMPACT>
- <DT><CODE>-a</CODE>
- <DD><A NAME="IDX49"></A>
- <DT><CODE>--archive-header</CODE>
- <DD>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.
-
- <DT><CODE>-b <VAR>bfdname</VAR></CODE>
- <DD><A NAME="IDX50"></A>
- <DT><CODE>--target=<VAR>bfdname</VAR></CODE>
- <DD>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.
-
- For example,
- <PRE>
- objdump -b oasys -m vax -h fu.o
- </PRE>
- displays summary information from the section headers (<SAMP>`-h'</SAMP>) of
- <TT>`fu.o'</TT>, 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 section <A HREF="BINUTILS.000#SEC15">Target Selection</A>, for more information.
-
- <DT><CODE>-d</CODE>
- <DD><A NAME="IDX51"></A>
- <A NAME="IDX52"></A>
- <DT><CODE>--disassemble</CODE>
- <DD>Display the assembler mnemonics for the machine instructions from
- <VAR>objfile</VAR>. This option only disassembles those sections which are
- expected to contain instructions.
-
- <DT><CODE>-D</CODE>
- <DD><DT><CODE>--disassemble-all</CODE>
- <DD>Like <SAMP>`-d'</SAMP>, but disassemble the contents of all sections, not just
- those expected to contain instructions.
-
- <DT><CODE>-f</CODE>
- <DD><A NAME="IDX53"></A>
- <DT><CODE>--file-header</CODE>
- <DD>Display summary information from the overall header of
- each of the <VAR>objfile</VAR> files.
-
- <DT><CODE>-h</CODE>
- <DD><DT><CODE>--section-header</CODE>
- <DD><A NAME="IDX54"></A>
- <DT><CODE>--header</CODE>
- <DD>Display summary information from the section headers of the
- object file.
-
- 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.
-
- <DT><CODE>--help</CODE>
- <DD>Print a summary of the options to <CODE>objdump</CODE> and exit.
-
- <DT><CODE>-i</CODE>
- <DD><A NAME="IDX55"></A>
- <A NAME="IDX56"></A>
- <DT><CODE>--info</CODE>
- <DD>Display a list showing all architectures and object formats available
- for specification with <SAMP>`-b'</SAMP> or <SAMP>`-m'</SAMP>.
-
- <DT><CODE>-j <VAR>name</VAR></CODE>
- <DD><A NAME="IDX57"></A>
- <DT><CODE>--section=<VAR>name</VAR></CODE>
- <DD>Display information only for section <VAR>name</VAR>.
-
- <DT><CODE>-l</CODE>
- <DD><A NAME="IDX58"></A>
- <DT><CODE>--line-numbers</CODE>
- <DD>Label the display (using debugging information) with the filename
- and source line numbers corresponding to the object code shown.
- Only useful with <SAMP>`-d'</SAMP> or <SAMP>`-D'</SAMP>.
-
- <DT><CODE>-m <VAR>machine</VAR></CODE>
- <DD><A NAME="IDX59"></A>
- <DT><CODE>--architecture=<VAR>machine</VAR></CODE>
- <DD>Specify that the object files <VAR>objfile</VAR> are for architecture
- <VAR>machine</VAR>. You can list available architectures using the <SAMP>`-i'</SAMP>
- option.
-
- <DT><CODE>-r</CODE>
- <DD><A NAME="IDX60"></A>
- <DT><CODE>--reloc</CODE>
- <DD>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.
-
- <DT><CODE>-R</CODE>
- <DD><A NAME="IDX61"></A>
- <DT><CODE>--dynamic-reloc</CODE>
- <DD>Print the dynamic relocation entries of the file. This is only
- meaningful for dynamic objects, such as certain types of shared
- libraries.
-
- <DT><CODE>-s</CODE>
- <DD><A NAME="IDX62"></A>
- <A NAME="IDX63"></A>
- <DT><CODE>--full-contents</CODE>
- <DD>Display the full contents of any sections requested.
-
- <DT><CODE>-S</CODE>
- <DD><A NAME="IDX64"></A>
- <A NAME="IDX65"></A>
- <DT><CODE>--source</CODE>
- <DD>Display source code intermixed with disassembly, if possible. Implies
- <SAMP>`-d'</SAMP>.
-
- <A NAME="IDX66"></A>
- <A NAME="IDX67"></A>
- <A NAME="IDX68"></A>
- <A NAME="IDX69"></A>
- <DT><CODE>--stabs</CODE>
- <DD>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.
-
- <DT><CODE>-t</CODE>
- <DD><A NAME="IDX70"></A>
- <DT><CODE>--syms</CODE>
- <DD>Print the symbol table entries of the file.
- This is similar to the information provided by the <SAMP>`nm'</SAMP> program.
-
- <DT><CODE>-T</CODE>
- <DD><A NAME="IDX71"></A>
- <DT><CODE>--dynamic-syms</CODE>
- <DD>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.
-
- <DT><CODE>--version</CODE>
- <DD>Print the version number of <CODE>objdump</CODE> and exit.
-
- <DT><CODE>-x</CODE>
- <DD><A NAME="IDX72"></A>
- <A NAME="IDX73"></A>
- <DT><CODE>--all-header</CODE>
- <DD>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 -r -t'</SAMP>.
- </DL>
- <P>
- <H1><A NAME="SEC8" HREF="BINUTILS.HTM#SEC8">ranlib</A></H1>
- <A NAME="IDX74"></A>
- <A NAME="IDX75"></A>
- <A NAME="IDX76"></A>
- <P>
- <PRE>
- ranlib [-vV] <VAR>archive</VAR>
- </PRE>
- <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>
- You may use <SAMP>`nm -s'</SAMP> or <SAMP>`nm --print-armap'</SAMP> to list this index.
- <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>
- The GNU <CODE>ranlib</CODE> program is another form of GNU <CODE>ar</CODE>; running
- <CODE>ranlib</CODE> is completely equivalent to executing <SAMP>`ar -s'</SAMP>.
- See section <A HREF="BINUTILS.000#SEC1">ar</A>.
- <P>
- <DL COMPACT>
- <DT><CODE>-v</CODE>
- <DD><DT><CODE>-V</CODE>
- <DD>Show the version number of <CODE>ranlib</CODE>.
- </DL>
- <P>
- <H1><A NAME="SEC9" HREF="BINUTILS.HTM#SEC9">size</A></H1>
- <A NAME="IDX77"></A>
- <A NAME="IDX78"></A>
- <P>
- <PRE>
- size [ -A | -B | --format=<VAR>compatibility</VAR> ]
- [ --help ] [ -d | -o | -x | --radix=<VAR>number</VAR> ]
- [ --target=<VAR>bfdname</VAR> ] [ -V | --version ]
- <VAR>objfile</VAR>...
- </PRE>
- <P>
- The GNU <CODE>size</CODE> utility lists the section sizes--and the total
- size--for each of the object or archive files <VAR>objfile</VAR> in its
- argument list. By default, one line of output is generated for each
- object file or each module in an archive.
- <P>
- <VAR>objfile</VAR>... are the object files to be examined.
- <P>
- The command line options have the following meanings:
- <P>
- <DL COMPACT>
- <DT><CODE>-A</CODE>
- <DD><DT><CODE>-B</CODE>
- <DD><A NAME="IDX79"></A>
- <DT><CODE>--format=<VAR>compatibility</VAR></CODE>
- <DD>Using one of these options, you can choose whether the output from GNU
- <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.
-
- Here is an example of the Berkeley (default) format of output from
- <CODE>size</CODE>:
- <PRE>
- size --format=Berkeley ranlib size
- text data bss dec hex filename
- 294880 81920 11592 388392 5ed28 ranlib
- 294880 81920 11888 388688 5ee50 size
- </PRE>
-
- This is the same data, but displayed closer to System V conventions:
-
- <PRE>
- 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>
-
- <DT><CODE>--help</CODE>
- <DD>Show a summary of acceptable arguments and options.
-
- <DT><CODE>-d</CODE>
- <DD><DT><CODE>-o</CODE>
- <DD><DT><CODE>-x</CODE>
- <DD><A NAME="IDX80"></A>
- <A NAME="IDX81"></A>
- <DT><CODE>--radix=<VAR>number</VAR></CODE>
- <DD>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>.
-
- <A NAME="IDX82"></A>
- <DT><CODE>--target=<VAR>bfdname</VAR></CODE>
- <DD>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 section <A HREF="BINUTILS.000#SEC15">Target Selection</A>, for more information.
-
- <DT><CODE>-V</CODE>
- <DD><DT><CODE>--version</CODE>
- <DD>Display the version number of <CODE>size</CODE>.
- </DL>
- <P>
- <A NAME="IDX83"></A>
- <A NAME="IDX84"></A>
- <A NAME="IDX85"></A>
- <A NAME="IDX86"></A>
- <H1><A NAME="SEC10" HREF="BINUTILS.HTM#SEC10">strings</A></H1>
- <P>
- <PRE>
- strings [-afov] [-<VAR>min-len</VAR>] [-n <VAR>min-len</VAR>] [-t <VAR>radix</VAR>] [-]
- [--all] [--print-file-name] [--bytes=<VAR>min-len</VAR>]
- [--radix=<VAR>radix</VAR>] [--target=<VAR>bfdname</VAR>]
- [--help] [--version] <VAR>file</VAR>...
- </PRE>
- <P>
- For each <VAR>file</VAR> given, GNU <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 a NUL or newline
- character. By default, it only prints the strings from the initialized
- data sections of object files; for other types of files, it prints the
- strings from the whole file.
- <P>
- <CODE>strings</CODE> is mainly useful for determining the contents of non-text
- files.
- <P>
- <DL COMPACT>
- <DT><CODE>-a</CODE>
- <DD><DT><CODE>--all</CODE>
- <DD><DT><CODE>-</CODE>
- <DD>Do not scan only the initialized data section of object files; scan
- the whole files.
-
- <DT><CODE>-f</CODE>
- <DD><DT><CODE>--print-file-name</CODE>
- <DD>Print the name of the file before each string.
-
- <DT><CODE>--help</CODE>
- <DD>Print a summary of the program usage on the standard output and exit.
-
- <DT><CODE>-<VAR>min-len</VAR></CODE>
- <DD><DT><CODE>-n <VAR>min-len</VAR></CODE>
- <DD><DT><CODE>--bytes=<VAR>min-len</VAR></CODE>
- <DD>Print sequences of characters that are at least <VAR>min-len</VAR> characters
- long, instead of the default 4.
-
- <DT><CODE>-o</CODE>
- <DD>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.
-
- <DT><CODE>-t <VAR>radix</VAR></CODE>
- <DD><DT><CODE>--radix=<VAR>radix</VAR></CODE>
- <DD>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.
-
- <A NAME="IDX87"></A>
- <DT><CODE>--target=<VAR>bfdname</VAR></CODE>
- <DD>Specify an object code format other than your system's default format.
- See section <A HREF="BINUTILS.000#SEC15">Target Selection</A>, for more information.
-
- <DT><CODE>-v</CODE>
- <DD><DT><CODE>--version</CODE>
- <DD>Print the program version number on the standard output and exit.
- </DL>
- <P>
- <H1><A NAME="SEC11" HREF="BINUTILS.HTM#SEC11">strip</A></H1>
- <A NAME="IDX88"></A>
- <A NAME="IDX89"></A>
- <A NAME="IDX90"></A>
- <A NAME="IDX91"></A>
- <P>
- <PRE>
- strip [ -F <VAR>bfdname</VAR> | --target=<VAR>bfdname</VAR> | --target=<VAR>bfdname</VAR> ]
- [ -I <VAR>bfdname</VAR> | --input-target=<VAR>bfdname</VAR> ]
- [ -O <VAR>bfdname</VAR> | --output-target=<VAR>bfdname</VAR> ]
- [ -s | --strip-all ] [ -S | -g | --strip-debug ]
- [ -K <VAR>symbolname</VAR> | --keep-symbol=<VAR>symbolname</VAR> ]
- [ -N <VAR>symbolname</VAR> | --strip-symbol=<VAR>symbolname</VAR> ]
- [ -x | --discard-all ] [ -X | --discard-locals ]
- [ -R <VAR>sectionname</VAR> | --remove-section=<VAR>sectionname</VAR> ]
- [ -v | --verbose ] [ -V | --version ] [ --help ]
- <VAR>objfile</VAR>...
- </PRE>
- <P>
- GNU <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>
- <CODE>strip</CODE> modifies the files named in its argument,
- rather than writing modified copies under different names.
- <P>
- <DL COMPACT>
- <DT><CODE>-F <VAR>bfdname</VAR></CODE>
- <DD><DT><CODE>--target=<VAR>bfdname</VAR></CODE>
- <DD>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 section <A HREF="BINUTILS.000#SEC15">Target Selection</A>, for more information.
-
- <DT><CODE>--help</CODE>
- <DD>Show a summary of the options to <CODE>strip</CODE> and exit.
-
- <DT><CODE>-I <VAR>bfdname</VAR></CODE>
- <DD><DT><CODE>--input-target=<VAR>bfdname</VAR></CODE>
- <DD>Treat the original <VAR>objfile</VAR> as a file with the object
- code format <VAR>bfdname</VAR>.
- See section <A HREF="BINUTILS.000#SEC15">Target Selection</A>, for more information.
-
- <DT><CODE>-O <VAR>bfdname</VAR></CODE>
- <DD><DT><CODE>--output-target=<VAR>bfdname</VAR></CODE>
- <DD>Replace <VAR>objfile</VAR> with a file in the output format <VAR>bfdname</VAR>.
- See section <A HREF="BINUTILS.000#SEC15">Target Selection</A>, for more information.
-
- <DT><CODE>-R <VAR>sectionname</VAR></CODE>
- <DD><DT><CODE>--remove-section=<VAR>sectionname</VAR></CODE>
- <DD>Remove any section named <VAR>sectionname</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.
-
- <DT><CODE>-s</CODE>
- <DD><DT><CODE>--strip-all</CODE>
- <DD>Remove all symbols.
-
- <DT><CODE>-g</CODE>
- <DD><DT><CODE>-S</CODE>
- <DD><DT><CODE>--strip-debug</CODE>
- <DD>Remove debugging symbols only.
-
- <DT><CODE>-K <VAR>symbolname</VAR></CODE>
- <DD><DT><CODE>--keep-symbol=<VAR>symbolname</VAR></CODE>
- <DD>Keep only symbol <VAR>symbolname</VAR> from the source file. This option may
- be given more than once.
-
- <DT><CODE>-N <VAR>symbolname</VAR></CODE>
- <DD><DT><CODE>--strip-symbol=<VAR>symbolname</VAR></CODE>
- <DD>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
- <CODE>-K</CODE>.
-
- <DT><CODE>-x</CODE>
- <DD><DT><CODE>--discard-all</CODE>
- <DD>Remove non-global symbols.
-
- <DT><CODE>-X</CODE>
- <DD><DT><CODE>--discard-locals</CODE>
- <DD>Remove compiler-generated local symbols.
- (These usually start with <SAMP>`L'</SAMP> or <SAMP>`.'</SAMP>.)
-
- <DT><CODE>-V</CODE>
- <DD><DT><CODE>--version</CODE>
- <DD>Show the version number for <CODE>strip</CODE>.
-
- <DT><CODE>-v</CODE>
- <DD><DT><CODE>--verbose</CODE>
- <DD>Verbose output: list all object files modified. In the case of
- archives, <SAMP>`strip -v'</SAMP> lists all members of the archive.
- </DL>
- <P>
- <H1><A NAME="SEC12" HREF="BINUTILS.HTM#SEC12">c++filt</A></H1>
- <A NAME="IDX92"></A>
- <A NAME="IDX93"></A>
- <P>
- <PRE>
- c++filt [ -_ | --strip-underscores ]
- [ -n | --no-strip-underscores ]
- [ -s <VAR>format</VAR> | --format=<VAR>format</VAR> ]
- [ --help ] [ --version ] [ <VAR>symbol</VAR>... ]
- </PRE>
- <P>
- The C++ language provides function overloading, which means that you can
- write many functions with the same name (providing each takes parameters
- of different types). All C++ function names are encoded into a
- low-level assembly label (this process is known as
- <DFN>mangling</DFN>). The <CODE>c++filt</CODE> program does the inverse mapping: it
- decodes (<DFN>demangles</DFN>) low-level names into user-level names so that
- the linker can keep these overloaded functions from clashing.
- <P>
- Every alphanumeric word (consisting of letters, digits, underscores,
- dollars, or periods) seen in the input is a potential label. If the
- label decodes into a C++ name, the C++ name replaces the low-level
- name in the output.
- <P>
- You can use <CODE>c++filt</CODE> to decipher individual symbols:
- <P>
- <PRE>
- c++filt <VAR>symbol</VAR>
- </PRE>
- <P>
- If no <VAR>symbol</VAR> arguments are given, <CODE>c++filt</CODE> reads symbol
- names from the standard input and writes the demangled names to the
- standard output. All results are printed on the standard output.
- <P>
- <DL COMPACT>
- <DT><CODE>-_</CODE>
- <DD><DT><CODE>--strip-underscores</CODE>
- <DD>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.
-
- <DT><CODE>-n</CODE>
- <DD><DT><CODE>--no-strip-underscores</CODE>
- <DD>Do not remove the initial underscore.
-
- <DT><CODE>-s <VAR>format</VAR></CODE>
- <DD><DT><CODE>--format=<VAR>format</VAR></CODE>
- <DD>GNU <CODE>nm</CODE> can decode three different methods of mangling, used by
- different C++ compilers. The argument to this option selects which
- method it uses:
-
- <DL COMPACT>
- <DT><CODE>gnu</CODE>
- <DD>the one used by the GNU compiler (the default method)
- <DT><CODE>lucid</CODE>
- <DD>the one used by the Lucid compiler
- <DT><CODE>arm</CODE>
- <DD>the one specified by the C++ Annotated Reference Manual
- </DL>
-
- <DT><CODE>--help</CODE>
- <DD>Print a summary of the options to <CODE>c++filt</CODE> and exit.
-
- <DT><CODE>--version</CODE>
- <DD>Print the version number of <CODE>c++filt</CODE> and exit.
- </DL>
- <P>
- <BLOCKQUOTE>
- <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 the future to decode a name
- passed as an argument on the command line; in other words,
- <P>
- <PRE>
- c++filt <VAR>symbol</VAR>
- </PRE>
- <P>
- may in a future release become
- <P>
- <PRE>
- c++filt <VAR>option</VAR> <VAR>symbol</VAR>
- </PRE>
- </BLOCKQUOTE>
- <P>
- <H1><A NAME="SEC13" HREF="BINUTILS.HTM#SEC13">nlmconv</A></H1>
- <P>
- <CODE>nlmconv</CODE> converts a relocatable object file into a NetWare
- Loadable Module.
- <P>
- <BLOCKQUOTE>
- <EM>Warning:</EM> <CODE>nlmconv</CODE> is not always built as part of the binary
- utilities, since it is only useful for NLM targets.
- </BLOCKQUOTE>
- <P>
- <PRE>
- nlmconv [ -I <VAR>bfdname</VAR> | --input-target=<VAR>bfdname</VAR> ]
- [ -O <VAR>bfdname</VAR> | --output-target=<VAR>bfdname</VAR> ]
- [ -T <VAR>headerfile</VAR> | --header-file=<VAR>headerfile</VAR> ]
- [ -d | --debug] [ -l <VAR>linker</VAR> | --linker=<VAR>linker</VAR> ]
- [ -h | --help ] [ -V | --version ]
- <VAR>infile</VAR> <VAR>outfile</VAR>
- </PRE>
- <P>
- <CODE>nlmconv</CODE> converts the relocatable <SAMP>`i386'</SAMP> object file
- <VAR>infile</VAR> into the NetWare Loadable Module <VAR>outfile</VAR>, optionally
- reading <VAR>headerfile</VAR> for NLM header information. For instructions
- on writing the NLM command file language used in header files, see the
- <SAMP>`linkers'</SAMP> section, <SAMP>`NLMLINK'</SAMP> in particular, of the <CITE>NLM
- Development and Tools Overview</CITE>, which is part of the NLM Software
- Developer's Kit ("NLM SDK"), available from Novell, Inc.
- <CODE>nlmconv</CODE> uses the GNU Binary File Descriptor library to read
- <VAR>infile</VAR>; see section `BFD' in <CITE>Using LD</CITE>, for
- more information.
- <P>
- <CODE>nlmconv</CODE> can perform a link step. In other words, you can list
- more than one object file for input if you list them in the definitions
- file (rather than simply specifying one input file on the command line).
- In this case, <CODE>nlmconv</CODE> calls the linker for you.
- <P>
- <DL COMPACT>
- <DT><CODE>-I <VAR>bfdname</VAR></CODE>
- <DD><DT><CODE>--input-target=<VAR>bfdname</VAR></CODE>
- <DD>Object format of the input file. <CODE>nlmconv</CODE> can usually determine
- the format of a given file (so no default is necessary).
- See section <A HREF="BINUTILS.000#SEC15">Target Selection</A>, for more information.
-
- <DT><CODE>-O <VAR>bfdname</VAR></CODE>
- <DD><DT><CODE>--output-target=<VAR>bfdname</VAR></CODE>
- <DD>Object format of the output file. <CODE>nlmconv</CODE> infers the output
- format based on the input format, e.g. for a <SAMP>`i386'</SAMP> input file the
- output format is <SAMP>`nlm32-i386'</SAMP>.
- See section <A HREF="BINUTILS.000#SEC15">Target Selection</A>, for more information.
-
- <DT><CODE>-T <VAR>headerfile</VAR></CODE>
- <DD><DT><CODE>--header-file=<VAR>headerfile</VAR></CODE>
- <DD>Reads <VAR>headerfile</VAR> for NLM header information. For instructions on
- writing the NLM command file language used in header files, see see the
- <SAMP>`linkers'</SAMP> section, of the <CITE>NLM Development and Tools
- Overview</CITE>, which is part of the NLM Software Developer's Kit, available
- from Novell, Inc.
-
- <DT><CODE>-d</CODE>
- <DD><DT><CODE>--debug</CODE>
- <DD>Displays (on standard error) the linker command line used by <CODE>nlmconv</CODE>.
-
- <DT><CODE>-l <VAR>linker</VAR></CODE>
- <DD><DT><CODE>--linker=<VAR>linker</VAR></CODE>
- <DD>Use <VAR>linker</VAR> for any linking. <VAR>linker</VAR> can be an abosolute or a
- relative pathname.
-
- <DT><CODE>-h</CODE>
- <DD><DT><CODE>--help</CODE>
- <DD>Prints a usage summary.
-
- <DT><CODE>-V</CODE>
- <DD><DT><CODE>--version</CODE>
- <DD>Prints the version number for <CODE>nlmconv</CODE>.
- </DL>
- <P>
- <H1><A NAME="SEC14" HREF="BINUTILS.HTM#SEC14">Selecting the target system</A></H1>
- <P>
- You can specify three aspects of the target system to the GNU
- binary file utilities, each in several ways:
- <P>
- <UL>
- <LI>
- the target
-
- <LI>
- the architecture
-
- <LI>
- the linker emulation (which applies to the linker only)
- </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>
- 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>`--with-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 <DFN>native</DFN> (on hosts
- with the same type as the target system).
- <P>
- <H2><A NAME="SEC15" HREF="BINUTILS.HTM#SEC15">Target Selection</A></H2>
- <P>
- A <DFN>target</DFN> is an object file format. A given target may be
- supported for multiple architectures (see section <A HREF="BINUTILS.000#SEC16">Architecture selection</A>).
- A target selection may also have variations for different operating
- systems or architectures.
- <P>
- The command to list valid target values is <SAMP>`objdump -i'</SAMP>
- (the first column of output contains the relevant information).
- <P>
- Some sample values are: <SAMP>`a.out-hp300bsd'</SAMP>, <SAMP>`ecoff-littlemips'</SAMP>,
- <SAMP>`a.out-sunos-big'</SAMP>.
- <P>
- <H3><CODE>objdump</CODE> Target</H3>
- <P>
- Ways to specify:
- <P>
- <OL>
- <LI>
- command line option: <SAMP>`-b'</SAMP> or <SAMP>`--target'</SAMP>
-
- <LI>
- environment variable <CODE>GNUTARGET</CODE>
-
- <LI>
- deduced from the input file
- </OL>
- <P>
- <H3><CODE>objcopy</CODE> and <CODE>strip</CODE> Input Target</H3>
- <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>
- environment variable <CODE>GNUTARGET</CODE>
-
- <LI>
- deduced from the input file
- </OL>
- <P>
- <H3><CODE>objcopy</CODE> and <CODE>strip</CODE> Output Target</H3>
- <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>
- the input target (see "<CODE>objcopy</CODE> and <CODE>strip</CODE> Input Target" above)
-
- <LI>
- environment variable <CODE>GNUTARGET</CODE>
-
- <LI>
- deduced from the input file
- </OL>
- <P>
- <H3><CODE>nm</CODE>, <CODE>size</CODE>, and <CODE>strings</CODE> Target</H3>
- <P>
- Ways to specify:
- <P>
- <OL>
- <LI>
- command line option: <SAMP>`--target'</SAMP>
-
- <LI>
- environment variable <CODE>GNUTARGET</CODE>
-
- <LI>
- deduced from the input file
- </OL>
- <P>
- <H3>Linker Input Target</H3>
- <P>
- Ways to specify:
- <P>
- <OL>
- <LI>
- command line option: <SAMP>`-b'</SAMP> or <SAMP>`--format'</SAMP>
- (see section `Options' in <CITE>Using LD</CITE>)
-
- <LI>
- script command <CODE>TARGET</CODE>
- (see section `Option Commands' in <CITE>Using LD</CITE>)
-
- <LI>
- environment variable <CODE>GNUTARGET</CODE>
- (see section `Environment' in <CITE>Using LD</CITE>)
-
- <LI>
- the default target of the selected linker emulation
- (see section <A HREF="BINUTILS.000#SEC17">Linker emulation selection</A>)
- </OL>
- <P>
- <H3>Linker Output Target</H3>
- <P>
- Ways to specify:
- <P>
- <OL>
- <LI>
- command line option: <SAMP>`-oformat'</SAMP>
- (see section `Options' in <CITE>Using LD</CITE>)
-
- <LI>
- script command <CODE>OUTPUT_FORMAT</CODE>
- (see section `Option Commands' in <CITE>Using LD</CITE>)
-
- <LI>
- the linker input target (see "Linker Input Target" above)
- </OL>
- <P>
- <H2><A NAME="SEC16" HREF="BINUTILS.HTM#SEC16">Architecture selection</A></H2>
- <P>
- An <DFN>architecture</DFN> is a type of CPU 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 CPU.
- <P>
- The command to list valid architecture values is <SAMP>`objdump -i'</SAMP> (the
- second column contains the relevant information).
- <P>
- Sample values: <SAMP>`m68k:68020'</SAMP>, <SAMP>`mips:3000'</SAMP>, <SAMP>`sparc'</SAMP>.
- <P>
- <H3><CODE>objdump</CODE> Architecture</H3>
- <P>
- Ways to specify:
- <P>
- <OL>
- <LI>
- command line option: <SAMP>`-m'</SAMP> or <SAMP>`--architecture'</SAMP>
-
- <LI>
- deduced from the input file
- </OL>
- <P>
- <H3><CODE>objcopy</CODE>, <CODE>nm</CODE>, <CODE>size</CODE>, <CODE>strings</CODE> Architecture</H3>
- <P>
- Ways to specify:
- <P>
- <OL>
- <LI>
- deduced from the input file
- </OL>
- <P>
- <H3>Linker Input Architecture</H3>
- <P>
- Ways to specify:
- <P>
- <OL>
- <LI>
- deduced from the input file
- </OL>
- <P>
- <H3>Linker Output Architecture</H3>
- <P>
- Ways to specify:
- <P>
- <OL>
- <LI>
- script command <CODE>OUTPUT_ARCH</CODE>
- (see section `Option Commands' in <CITE>Using LD</CITE>)
-
- <LI>
- the default architecture from the linker output target
- (see section <A HREF="BINUTILS.000#SEC15">Target Selection</A>)
- </OL>
- <P>
- <H2><A NAME="SEC17" HREF="BINUTILS.HTM#SEC17">Linker emulation selection</A></H2>
- <P>
- A linker <DFN>emulation</DFN> is a "personality" of the linker, which gives
- the linker default values for the other aspects of the target system.
- In particular, it consists of
- <P>
- <UL>
- <LI>
- the linker script
-
- <LI>
- the target
-
- <LI>
- several "hook" functions that are run at certain stages of the linking
- process to do special things that some targets require
- </UL>
- <P>
- The command to list valid linker emulation values is <SAMP>`ld -V'</SAMP>.
- <P>
- Sample values: <SAMP>`hp300bsd'</SAMP>, <SAMP>`mipslit'</SAMP>, <SAMP>`sun4'</SAMP>.
- <P>
- Ways to specify:
- <P>
- <OL>
- <LI>
- command line option: <SAMP>`-m'</SAMP>
- (see section `Options' in <CITE>Using LD</CITE>)
-
- <LI>
- environment variable <CODE>LDEMULATION</CODE>
-
- <LI>
- compiled-in <CODE>DEFAULT_EMULATION</CODE> from <TT>`Makefile'</TT>,
- which comes from <CODE>EMUL</CODE> in <TT>`config/<VAR>target</VAR>.mt'</TT>
- </OL>
- <P>
- <H1><A NAME="SEC18" HREF="BINUTILS.HTM#SEC18">Index</A></H1>
- <P>
- <H2>.</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX67">.stab</A>
- </DIR>
- <H2>a</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX72">all header information, object file</A>
- <LI><A HREF="BINUTILS.000#IDX1">ar</A>
- <LI><A HREF="BINUTILS.000#IDX8"><CODE>ar</CODE> compatibility</A>
- <LI><A HREF="BINUTILS.000#IDX59">architecture</A>
- <LI><A HREF="BINUTILS.000#IDX55">architectures available</A>
- <LI><A HREF="BINUTILS.000#IDX75">archive contents</A>
- <LI><A HREF="BINUTILS.000#IDX49">archive headers</A>
- <LI><A HREF="BINUTILS.000#IDX2">archives</A>
- </DIR>
- <H2>c</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX92">c++filt</A>
- <LI><A HREF="BINUTILS.000#IDX3">collections of files</A>
- <LI><A HREF="BINUTILS.000#IDX7">compatibility, <CODE>ar</CODE></A>
- <LI><A HREF="BINUTILS.000#IDX16">contents of archive</A>
- <LI><A HREF="BINUTILS.000#IDX21">creating archives</A>
- </DIR>
- <H2>d</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX22">dates in archive</A>
- <LI><A HREF="BINUTILS.000#IDX68">debug symbols</A>
- <LI><A HREF="BINUTILS.000#IDX34">debugging symbols</A>
- <LI><A HREF="BINUTILS.000#IDX11">deleting from archive</A>
- <LI><A HREF="BINUTILS.000#IDX93">demangling C++ symbols</A>
- <LI><A HREF="BINUTILS.000#IDX51">disassembling object code</A>
- <LI><A HREF="BINUTILS.000#IDX65">disassembly, with source</A>
- <LI><A HREF="BINUTILS.000#IDX90">discarding symbols</A>
- <LI><A HREF="BINUTILS.000#IDX61">dynamic relocation entries, in object file</A>
- <LI><A HREF="BINUTILS.000#IDX71">dynamic symbol table entries, printing</A>
- <LI><A HREF="BINUTILS.000#IDX38">dynamic symbols</A>
- </DIR>
- <H2>e</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX69">ELF object file format</A>
- <LI><A HREF="BINUTILS.000#IDX45">external symbols</A>
- <LI><A HREF="BINUTILS.000#IDX19">extract from archive</A>
- </DIR>
- <H2>f</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX32">file name</A>
- </DIR>
- <H2>h</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX73">header information, all</A>
- </DIR>
- <H2>i</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX31">input file name</A>
- </DIR>
- <H2>l</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX28">ld</A>
- <LI><A HREF="BINUTILS.000#IDX5">libraries</A>
- <LI><A HREF="BINUTILS.000#IDX27">linker</A>
- <LI><A HREF="BINUTILS.000#IDX84">listings strings</A>
- </DIR>
- <H2>m</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX52">machine instructions</A>
- <LI><A HREF="BINUTILS.000#IDX12">moving in archive</A>
- <LI><A HREF="BINUTILS.000#IDX25">MRI compatibility, <CODE>ar</CODE></A>
- </DIR>
- <H2>n</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX18">name duplication in archive</A>
- <LI><A HREF="BINUTILS.000#IDX4">name length</A>
- <LI><A HREF="BINUTILS.000#IDX30">nm</A>
- <LI><A HREF="BINUTILS.000#IDX40"><CODE>nm</CODE> compatibility</A>
- <LI><A HREF="BINUTILS.000#IDX39"><CODE>nm</CODE> format</A>
- </DIR>
- <H2>o</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX48">objdump</A>
- <LI><A HREF="BINUTILS.000#IDX87">object code format</A>
- <LI><A HREF="BINUTILS.000#IDX53">object file header</A>
- <LI><A HREF="BINUTILS.000#IDX47">object file information</A>
- <LI><A HREF="BINUTILS.000#IDX63">object file sections</A>
- <LI><A HREF="BINUTILS.000#IDX56">object formats available</A>
- <LI><A HREF="BINUTILS.000#IDX10">operations on archive</A>
- </DIR>
- <H2>p</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX13">printing from archive</A>
- <LI><A HREF="BINUTILS.000#IDX85">printing strings</A>
- </DIR>
- <H2>q</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX14">quick append to archive</A>
- </DIR>
- <H2>r</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX81">radix for section sizes</A>
- <LI><A HREF="BINUTILS.000#IDX74">ranlib</A>
- <LI><A HREF="BINUTILS.000#IDX20">relative placement in archive</A>
- <LI><A HREF="BINUTILS.000#IDX60">relocation entries, in object file</A>
- <LI><A HREF="BINUTILS.000#IDX89">removing symbols</A>
- <LI><A HREF="BINUTILS.000#IDX17">repeated names in archive</A>
- <LI><A HREF="BINUTILS.000#IDX15">replacement in archive</A>
- </DIR>
- <H2>s</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX26">scripts, <CODE>ar</CODE></A>
- <LI><A HREF="BINUTILS.000#IDX54">section headers</A>
- <LI><A HREF="BINUTILS.000#IDX57">section information</A>
- <LI><A HREF="BINUTILS.000#IDX78">section sizes</A>
- <LI><A HREF="BINUTILS.000#IDX62">sections, full contents</A>
- <LI><A HREF="BINUTILS.000#IDX77">size</A>
- <LI><A HREF="BINUTILS.000#IDX79"><CODE>size</CODE> display format</A>
- <LI><A HREF="BINUTILS.000#IDX80"><CODE>size</CODE> number format</A>
- <LI><A HREF="BINUTILS.000#IDX42">sorting symbols</A>
- <LI><A HREF="BINUTILS.000#IDX64">source disassembly</A>
- <LI><A HREF="BINUTILS.000#IDX33">source file name</A>
- <LI><A HREF="BINUTILS.000#IDX58">source filenames for object files</A>
- <LI><A HREF="BINUTILS.000#IDX66">stab</A>
- <LI><A HREF="BINUTILS.000#IDX83">strings</A>
- <LI><A HREF="BINUTILS.000#IDX86">strings, printing</A>
- <LI><A HREF="BINUTILS.000#IDX88">strip</A>
- <LI><A HREF="BINUTILS.000#IDX76">symbol index</A>
- <LI><A HREF="BINUTILS.000#IDX43">symbol index, listing</A>
- <LI><A HREF="BINUTILS.000#IDX70">symbol table entries, printing</A>
- <LI><A HREF="BINUTILS.000#IDX29">symbols</A>
- <LI><A HREF="BINUTILS.000#IDX91">symbols, discarding</A>
- </DIR>
- <H2>u</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX46">undefined symbols</A>
- <LI><A HREF="BINUTILS.000#IDX9">Unix compatibility, <CODE>ar</CODE></A>
- <LI><A HREF="BINUTILS.000#IDX24">updating an archive</A>
- </DIR>
- <H2>w</H2>
- <DIR>
- <LI><A HREF="BINUTILS.000#IDX23">writing archive index</A>
- </DIR>
- <P>
- </BODY>
- </HTML>
-