Home | History | Annotate | Download | only in info
      1 This is binutils.info, produced by makeinfo version 4.13 from
      2 /tmp/android-15472/src/build/../binutils/binutils-2.21/binutils/doc/binutils.texi.
      3 
      4 Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
      5 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
      6 Software Foundation, Inc.
      7 
      8    Permission is granted to copy, distribute and/or modify this document
      9 under the terms of the GNU Free Documentation License, Version 1.3 or
     10 any later version published by the Free Software Foundation; with no
     11 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
     12 Texts.  A copy of the license is included in the section entitled "GNU
     13 Free Documentation License".
     14 
     15 INFO-DIR-SECTION Software development
     16 START-INFO-DIR-ENTRY
     17 * Binutils: (binutils).         The GNU binary utilities.
     18 END-INFO-DIR-ENTRY
     19 
     20 INFO-DIR-SECTION Individual utilities
     21 START-INFO-DIR-ENTRY
     22 * addr2line: (binutils)addr2line. Convert addresses to file and line.
     23 * ar: (binutils)ar.               Create, modify, and extract from archives.
     24 * c++filt: (binutils)c++filt.	  Filter to demangle encoded C++ symbols.
     25 * cxxfilt: (binutils)c++filt.     MS-DOS name for c++filt.
     26 * dlltool: (binutils)dlltool.	  Create files needed to build and use DLLs.
     27 * nlmconv: (binutils)nlmconv.     Converts object code into an NLM.
     28 * nm: (binutils)nm.               List symbols from object files.
     29 * objcopy: (binutils)objcopy.	  Copy and translate object files.
     30 * objdump: (binutils)objdump.     Display information from object files.
     31 * ranlib: (binutils)ranlib.       Generate index to archive contents.
     32 * readelf: (binutils)readelf.	  Display the contents of ELF format files.
     33 * size: (binutils)size.           List section sizes and total size.
     34 * strings: (binutils)strings.     List printable strings from files.
     35 * strip: (binutils)strip.         Discard symbols.
     36 * elfedit: (binutils)elfedit.     Update the ELF header of ELF files.
     37 * windmc: (binutils)windmc.	  Generator for Windows message resources.
     38 * windres: (binutils)windres.	  Manipulate Windows resources.
     39 END-INFO-DIR-ENTRY
     40 
     41 
     42 File: binutils.info,  Node: Top,  Next: ar,  Up: (dir)
     43 
     44 Introduction
     45 ************
     46 
     47 This brief manual contains documentation for the GNU binary utilities
     48 (GNU Binutils) version 2.21:
     49 
     50    This document is distributed under the terms of the GNU Free
     51 Documentation License version 1.3.  A copy of the license is included
     52 in the section entitled "GNU Free Documentation License".
     53 
     54 * Menu:
     55 
     56 * ar::                          Create, modify, and extract from archives
     57 * nm::                          List symbols from object files
     58 * objcopy::			Copy and translate object files
     59 * objdump::                     Display information from object files
     60 * ranlib::                      Generate index to archive contents
     61 * readelf::                     Display the contents of ELF format files
     62 * size::                        List section sizes and total size
     63 * strings::                     List printable strings from files
     64 * strip::                       Discard symbols
     65 * elfedit::                     Update the ELF header of ELF files
     66 * c++filt::			Filter to demangle encoded C++ symbols
     67 * cxxfilt: c++filt.             MS-DOS name for c++filt
     68 * addr2line::			Convert addresses to file and line
     69 * nlmconv::                     Converts object code into an NLM
     70 * windres::			Manipulate Windows resources
     71 * windmc::			Generator for Windows message resources
     72 * dlltool::			Create files needed to build and use DLLs
     73 * Common Options::              Command-line options for all utilities
     74 * Selecting the Target System:: How these utilities determine the target
     75 * Reporting Bugs::              Reporting Bugs
     76 * GNU Free Documentation License::  GNU Free Documentation License
     77 * Binutils Index::              Binutils Index
     78 
     79 
     80 File: binutils.info,  Node: ar,  Next: nm,  Prev: Top,  Up: Top
     81 
     82 1 ar
     83 ****
     84 
     85      ar [`--plugin' NAME] [-]P[MOD [RELPOS] [COUNT]] ARCHIVE [MEMBER...]
     86      ar -M [ <mri-script ]
     87 
     88    The GNU `ar' program creates, modifies, and extracts from archives.
     89 An "archive" is a single file holding a collection of other files in a
     90 structure that makes it possible to retrieve the original individual
     91 files (called "members" of the archive).
     92 
     93    The original files' contents, mode (permissions), timestamp, owner,
     94 and group are preserved in the archive, and can be restored on
     95 extraction.
     96 
     97    GNU `ar' can maintain archives whose members have names of any
     98 length; however, depending on how `ar' is configured on your system, a
     99 limit on member-name length may be imposed for compatibility with
    100 archive formats maintained with other tools.  If it exists, the limit
    101 is often 15 characters (typical of formats related to a.out) or 16
    102 characters (typical of formats related to coff).
    103 
    104    `ar' is considered a binary utility because archives of this sort
    105 are most often used as "libraries" holding commonly needed subroutines.
    106 
    107    `ar' creates an index to the symbols defined in relocatable object
    108 modules in the archive when you specify the modifier `s'.  Once
    109 created, this index is updated in the archive whenever `ar' makes a
    110 change to its contents (save for the `q' update operation).  An archive
    111 with such an index speeds up linking to the library, and allows
    112 routines in the library to call each other without regard to their
    113 placement in the archive.
    114 
    115    You may use `nm -s' or `nm --print-armap' to list this index table.
    116 If an archive lacks the table, another form of `ar' called `ranlib' can
    117 be used to add just the table.
    118 
    119    GNU `ar' can optionally create a _thin_ archive, which contains a
    120 symbol index and references to the original copies of the member files
    121 of the archives.  Such an archive is useful for building libraries for
    122 use within a local build, where the relocatable objects are expected to
    123 remain available, and copying the contents of each object would only
    124 waste time and space.  Thin archives are also _flattened_, so that
    125 adding one or more archives to a thin archive will add the elements of
    126 the nested archive individually.  The paths to the elements of the
    127 archive are stored relative to the archive itself.
    128 
    129    GNU `ar' is designed to be compatible with two different facilities.
    130 You can control its activity using command-line options, like the
    131 different varieties of `ar' on Unix systems; or, if you specify the
    132 single command-line option `-M', you can control it with a script
    133 supplied via standard input, like the MRI "librarian" program.
    134 
    135 * Menu:
    136 
    137 * ar cmdline::                  Controlling `ar' on the command line
    138 * ar scripts::                  Controlling `ar' with a script
    139 
    140 
    141 File: binutils.info,  Node: ar cmdline,  Next: ar scripts,  Up: ar
    142 
    143 1.1 Controlling `ar' on the Command Line
    144 ========================================
    145 
    146      ar [`--plugin' NAME] [`-X32_64'] [`-']P[MOD [RELPOS] [COUNT]] ARCHIVE [MEMBER...]
    147 
    148    When you use `ar' in the Unix style, `ar' insists on at least two
    149 arguments to execute: one keyletter specifying the _operation_
    150 (optionally accompanied by other keyletters specifying _modifiers_),
    151 and the archive name to act on.
    152 
    153    Most operations can also accept further MEMBER arguments, specifying
    154 particular files to operate on.
    155 
    156    GNU `ar' allows you to mix the operation code P and modifier flags
    157 MOD in any order, within the first command-line argument.
    158 
    159    If you wish, you may begin the first command-line argument with a
    160 dash.
    161 
    162    The P keyletter specifies what operation to execute; it may be any
    163 of the following, but you must specify only one of them:
    164 
    165 `d'
    166      _Delete_ modules from the archive.  Specify the names of modules to
    167      be deleted as MEMBER...; the archive is untouched if you specify
    168      no files to delete.
    169 
    170      If you specify the `v' modifier, `ar' lists each module as it is
    171      deleted.
    172 
    173 `m'
    174      Use this operation to _move_ members in an archive.
    175 
    176      The ordering of members in an archive can make a difference in how
    177      programs are linked using the library, if a symbol is defined in
    178      more than one member.
    179 
    180      If no modifiers are used with `m', any members you name in the
    181      MEMBER arguments are moved to the _end_ of the archive; you can
    182      use the `a', `b', or `i' modifiers to move them to a specified
    183      place instead.
    184 
    185 `p'
    186      _Print_ the specified members of the archive, to the standard
    187      output file.  If the `v' modifier is specified, show the member
    188      name before copying its contents to standard output.
    189 
    190      If you specify no MEMBER arguments, all the files in the archive
    191      are printed.
    192 
    193 `q'
    194      _Quick append_; Historically, add the files MEMBER... to the end of
    195      ARCHIVE, without checking for replacement.
    196 
    197      The modifiers `a', `b', and `i' do _not_ affect this operation;
    198      new members are always placed at the end of the archive.
    199 
    200      The modifier `v' makes `ar' list each file as it is appended.
    201 
    202      Since the point of this operation is speed, the archive's symbol
    203      table index is not updated, even if it already existed; you can
    204      use `ar s' or `ranlib' explicitly to update the symbol table index.
    205 
    206      However, too many different systems assume quick append rebuilds
    207      the index, so GNU `ar' implements `q' as a synonym for `r'.
    208 
    209 `r'
    210      Insert the files MEMBER... into ARCHIVE (with _replacement_). This
    211      operation differs from `q' in that any previously existing members
    212      are deleted if their names match those being added.
    213 
    214      If one of the files named in MEMBER... does not exist, `ar'
    215      displays an error message, and leaves undisturbed any existing
    216      members of the archive matching that name.
    217 
    218      By default, new members are added at the end of the file; but you
    219      may use one of the modifiers `a', `b', or `i' to request placement
    220      relative to some existing member.
    221 
    222      The modifier `v' used with this operation elicits a line of output
    223      for each file inserted, along with one of the letters `a' or `r'
    224      to indicate whether the file was appended (no old member deleted)
    225      or replaced.
    226 
    227 `s'
    228      Add an index to the archive, or update it if it already exists.
    229      Note this command is an exception to the rule that there can only
    230      be one command letter, as it is possible to use it as either a
    231      command or a modifier.  In either case it does the same thing.
    232 
    233 `t'
    234      Display a _table_ listing the contents of ARCHIVE, or those of the
    235      files listed in MEMBER... that are present in the archive.
    236      Normally only the member name is shown; if you also want to see
    237      the modes (permissions), timestamp, owner, group, and size, you can
    238      request that by also specifying the `v' modifier.
    239 
    240      If you do not specify a MEMBER, all files in the archive are
    241      listed.
    242 
    243      If there is more than one file with the same name (say, `fie') in
    244      an archive (say `b.a'), `ar t b.a fie' lists only the first
    245      instance; to see them all, you must ask for a complete listing--in
    246      our example, `ar t b.a'.
    247 
    248 `x'
    249      _Extract_ members (named MEMBER) from the archive.  You can use
    250      the `v' modifier with this operation, to request that `ar' list
    251      each name as it extracts it.
    252 
    253      If you do not specify a MEMBER, all files in the archive are
    254      extracted.
    255 
    256      Files cannot be extracted from a thin archive.
    257 
    258 
    259    A number of modifiers (MOD) may immediately follow the P keyletter,
    260 to specify variations on an operation's behavior:
    261 
    262 `a'
    263      Add new files _after_ an existing member of the archive.  If you
    264      use the modifier `a', the name of an existing archive member must
    265      be present as the RELPOS argument, before the ARCHIVE
    266      specification.
    267 
    268 `b'
    269      Add new files _before_ an existing member of the archive.  If you
    270      use the modifier `b', the name of an existing archive member must
    271      be present as the RELPOS argument, before the ARCHIVE
    272      specification.  (same as `i').
    273 
    274 `c'
    275      _Create_ the archive.  The specified ARCHIVE is always created if
    276      it did not exist, when you request an update.  But a warning is
    277      issued unless you specify in advance that you expect to create it,
    278      by using this modifier.
    279 
    280 `D'
    281      Operate in _deterministic_ mode.  When adding files and the archive
    282      index use zero for UIDs, GIDs, timestamps, and use consistent file
    283      modes for all files.  When this option is used, if `ar' is used
    284      with identical options and identical input files, multiple runs
    285      will create identical output files regardless of the input files'
    286      owners, groups, file modes, or modification times.
    287 
    288 `f'
    289      Truncate names in the archive.  GNU `ar' will normally permit file
    290      names of any length.  This will cause it to create archives which
    291      are not compatible with the native `ar' program on some systems.
    292      If this is a concern, the `f' modifier may be used to truncate file
    293      names when putting them in the archive.
    294 
    295 `i'
    296      Insert new files _before_ an existing member of the archive.  If
    297      you use the modifier `i', the name of an existing archive member
    298      must be present as the RELPOS argument, before the ARCHIVE
    299      specification.  (same as `b').
    300 
    301 `l'
    302      This modifier is accepted but not used.
    303 
    304 `N'
    305      Uses the COUNT parameter.  This is used if there are multiple
    306      entries in the archive with the same name.  Extract or delete
    307      instance COUNT of the given name from the archive.
    308 
    309 `o'
    310      Preserve the _original_ dates of members when extracting them.  If
    311      you do not specify this modifier, files extracted from the archive
    312      are stamped with the time of extraction.
    313 
    314 `P'
    315      Use the full path name when matching names in the archive.  GNU
    316      `ar' can not create an archive with a full path name (such archives
    317      are not POSIX complaint), but other archive creators can.  This
    318      option will cause GNU `ar' to match file names using a complete
    319      path name, which can be convenient when extracting a single file
    320      from an archive created by another tool.
    321 
    322 `s'
    323      Write an object-file index into the archive, or update an existing
    324      one, even if no other change is made to the archive.  You may use
    325      this modifier flag either with any operation, or alone.  Running
    326      `ar s' on an archive is equivalent to running `ranlib' on it.
    327 
    328 `S'
    329      Do not generate an archive symbol table.  This can speed up
    330      building a large library in several steps.  The resulting archive
    331      can not be used with the linker.  In order to build a symbol
    332      table, you must omit the `S' modifier on the last execution of
    333      `ar', or you must run `ranlib' on the archive.
    334 
    335 `T'
    336      Make the specified ARCHIVE a _thin_ archive.  If it already exists
    337      and is a regular archive, the existing members must be present in
    338      the same directory as ARCHIVE.
    339 
    340 `u'
    341      Normally, `ar r'... inserts all files listed into the archive.  If
    342      you would like to insert _only_ those of the files you list that
    343      are newer than existing members of the same names, use this
    344      modifier.  The `u' modifier is allowed only for the operation `r'
    345      (replace).  In particular, the combination `qu' is not allowed,
    346      since checking the timestamps would lose any speed advantage from
    347      the operation `q'.
    348 
    349 `v'
    350      This modifier requests the _verbose_ version of an operation.  Many
    351      operations display additional information, such as filenames
    352      processed, when the modifier `v' is appended.
    353 
    354 `V'
    355      This modifier shows the version number of `ar'.
    356 
    357    `ar' ignores an initial option spelt `-X32_64', for compatibility
    358 with AIX.  The behaviour produced by this option is the default for GNU
    359 `ar'.  `ar' does not support any of the other `-X' options; in
    360 particular, it does not support `-X32' which is the default for AIX
    361 `ar'.
    362 
    363    The optional command line switch `--plugin' NAME causes `ar' to load
    364 the plugin called NAME which adds support for more file formats.  This
    365 option is only available if the toolchain has been built with plugin
    366 support enabled.
    367 
    368 
    369 File: binutils.info,  Node: ar scripts,  Prev: ar cmdline,  Up: ar
    370 
    371 1.2 Controlling `ar' with a Script
    372 ==================================
    373 
    374      ar -M [ <SCRIPT ]
    375 
    376    If you use the single command-line option `-M' with `ar', you can
    377 control its operation with a rudimentary command language.  This form
    378 of `ar' operates interactively if standard input is coming directly
    379 from a terminal.  During interactive use, `ar' prompts for input (the
    380 prompt is `AR >'), and continues executing even after errors.  If you
    381 redirect standard input to a script file, no prompts are issued, and
    382 `ar' abandons execution (with a nonzero exit code) on any error.
    383 
    384    The `ar' command language is _not_ designed to be equivalent to the
    385 command-line options; in fact, it provides somewhat less control over
    386 archives.  The only purpose of the command language is to ease the
    387 transition to GNU `ar' for developers who already have scripts written
    388 for the MRI "librarian" program.
    389 
    390    The syntax for the `ar' command language is straightforward:
    391    * commands are recognized in upper or lower case; for example, `LIST'
    392      is the same as `list'.  In the following descriptions, commands are
    393      shown in upper case for clarity.
    394 
    395    * a single command may appear on each line; it is the first word on
    396      the line.
    397 
    398    * empty lines are allowed, and have no effect.
    399 
    400    * comments are allowed; text after either of the characters `*' or
    401      `;' is ignored.
    402 
    403    * Whenever you use a list of names as part of the argument to an `ar'
    404      command, you can separate the individual names with either commas
    405      or blanks.  Commas are shown in the explanations below, for
    406      clarity.
    407 
    408    * `+' is used as a line continuation character; if `+' appears at
    409      the end of a line, the text on the following line is considered
    410      part of the current command.
    411 
    412    Here are the commands you can use in `ar' scripts, or when using
    413 `ar' interactively.  Three of them have special significance:
    414 
    415    `OPEN' or `CREATE' specify a "current archive", which is a temporary
    416 file required for most of the other commands.
    417 
    418    `SAVE' commits the changes so far specified by the script.  Prior to
    419 `SAVE', commands affect only the temporary copy of the current archive.
    420 
    421 `ADDLIB ARCHIVE'
    422 `ADDLIB ARCHIVE (MODULE, MODULE, ... MODULE)'
    423      Add all the contents of ARCHIVE (or, if specified, each named
    424      MODULE from ARCHIVE) to the current archive.
    425 
    426      Requires prior use of `OPEN' or `CREATE'.
    427 
    428 `ADDMOD MEMBER, MEMBER, ... MEMBER'
    429      Add each named MEMBER as a module in the current archive.
    430 
    431      Requires prior use of `OPEN' or `CREATE'.
    432 
    433 `CLEAR'
    434      Discard the contents of the current archive, canceling the effect
    435      of any operations since the last `SAVE'.  May be executed (with no
    436      effect) even if  no current archive is specified.
    437 
    438 `CREATE ARCHIVE'
    439      Creates an archive, and makes it the current archive (required for
    440      many other commands).  The new archive is created with a temporary
    441      name; it is not actually saved as ARCHIVE until you use `SAVE'.
    442      You can overwrite existing archives; similarly, the contents of any
    443      existing file named ARCHIVE will not be destroyed until `SAVE'.
    444 
    445 `DELETE MODULE, MODULE, ... MODULE'
    446      Delete each listed MODULE from the current archive; equivalent to
    447      `ar -d ARCHIVE MODULE ... MODULE'.
    448 
    449      Requires prior use of `OPEN' or `CREATE'.
    450 
    451 `DIRECTORY ARCHIVE (MODULE, ... MODULE)'
    452 `DIRECTORY ARCHIVE (MODULE, ... MODULE) OUTPUTFILE'
    453      List each named MODULE present in ARCHIVE.  The separate command
    454      `VERBOSE' specifies the form of the output: when verbose output is
    455      off, output is like that of `ar -t ARCHIVE MODULE...'.  When
    456      verbose output is on, the listing is like `ar -tv ARCHIVE
    457      MODULE...'.
    458 
    459      Output normally goes to the standard output stream; however, if you
    460      specify OUTPUTFILE as a final argument, `ar' directs the output to
    461      that file.
    462 
    463 `END'
    464      Exit from `ar', with a `0' exit code to indicate successful
    465      completion.  This command does not save the output file; if you
    466      have changed the current archive since the last `SAVE' command,
    467      those changes are lost.
    468 
    469 `EXTRACT MODULE, MODULE, ... MODULE'
    470      Extract each named MODULE from the current archive, writing them
    471      into the current directory as separate files.  Equivalent to `ar -x
    472      ARCHIVE MODULE...'.
    473 
    474      Requires prior use of `OPEN' or `CREATE'.
    475 
    476 `LIST'
    477      Display full contents of the current archive, in "verbose" style
    478      regardless of the state of `VERBOSE'.  The effect is like `ar tv
    479      ARCHIVE'.  (This single command is a GNU `ar' enhancement, rather
    480      than present for MRI compatibility.)
    481 
    482      Requires prior use of `OPEN' or `CREATE'.
    483 
    484 `OPEN ARCHIVE'
    485      Opens an existing archive for use as the current archive (required
    486      for many other commands).  Any changes as the result of subsequent
    487      commands will not actually affect ARCHIVE until you next use
    488      `SAVE'.
    489 
    490 `REPLACE MODULE, MODULE, ... MODULE'
    491      In the current archive, replace each existing MODULE (named in the
    492      `REPLACE' arguments) from files in the current working directory.
    493      To execute this command without errors, both the file, and the
    494      module in the current archive, must exist.
    495 
    496      Requires prior use of `OPEN' or `CREATE'.
    497 
    498 `VERBOSE'
    499      Toggle an internal flag governing the output from `DIRECTORY'.
    500      When the flag is on, `DIRECTORY' output matches output from `ar
    501      -tv '....
    502 
    503 `SAVE'
    504      Commit your changes to the current archive, and actually save it
    505      as a file with the name specified in the last `CREATE' or `OPEN'
    506      command.
    507 
    508      Requires prior use of `OPEN' or `CREATE'.
    509 
    510 
    511 
    512 File: binutils.info,  Node: nm,  Next: objcopy,  Prev: ar,  Up: Top
    513 
    514 2 nm
    515 ****
    516 
    517      nm [`-a'|`--debug-syms']
    518         [`-g'|`--extern-only'][`--plugin' NAME]
    519         [`-B'] [`-C'|`--demangle'[=STYLE]] [`-D'|`--dynamic']
    520         [`-S'|`--print-size'] [`-s'|`--print-armap']
    521         [`-A'|`-o'|`--print-file-name'][`--special-syms']
    522         [`-n'|`-v'|`--numeric-sort'] [`-p'|`--no-sort']
    523         [`-r'|`--reverse-sort'] [`--size-sort'] [`-u'|`--undefined-only']
    524         [`-t' RADIX|`--radix='RADIX] [`-P'|`--portability']
    525         [`--target='BFDNAME] [`-f'FORMAT|`--format='FORMAT]
    526         [`--defined-only'] [`-l'|`--line-numbers'] [`--no-demangle']
    527         [`-V'|`--version'] [`-X 32_64'] [`--help']  [OBJFILE...]
    528 
    529    GNU `nm' lists the symbols from object files OBJFILE....  If no
    530 object files are listed as arguments, `nm' assumes the file `a.out'.
    531 
    532    For each symbol, `nm' shows:
    533 
    534    * The symbol value, in the radix selected by options (see below), or
    535      hexadecimal by default.
    536 
    537    * The symbol type.  At least the following types are used; others
    538      are, as well, depending on the object file format.  If lowercase,
    539      the symbol is local; if uppercase, the symbol is global (external).
    540 
    541     `A'
    542           The symbol's value is absolute, and will not be changed by
    543           further linking.
    544 
    545     `B'
    546     `b'
    547           The symbol is in the uninitialized data section (known as
    548           BSS).
    549 
    550     `C'
    551           The symbol is common.  Common symbols are uninitialized data.
    552           When linking, multiple common symbols may appear with the
    553           same name.  If the symbol is defined anywhere, the common
    554           symbols are treated as undefined references.  For more
    555           details on common symbols, see the discussion of -warn-common
    556           in *note Linker options: (ld.info)Options.
    557 
    558     `D'
    559     `d'
    560           The symbol is in the initialized data section.
    561 
    562     `G'
    563     `g'
    564           The symbol is in an initialized data section for small
    565           objects.  Some object file formats permit more efficient
    566           access to small data objects, such as a global int variable
    567           as opposed to a large global array.
    568 
    569     `i'
    570           For PE format files this indicates that the symbol is in a
    571           section specific to the implementation of DLLs.  For ELF
    572           format files this indicates that the symbol is an indirect
    573           function.  This is a GNU extension to the standard set of ELF
    574           symbol types.  It indicates a symbol which if referenced by a
    575           relocation does not evaluate to its address, but instead must
    576           be invoked at runtime.  The runtime execution will then
    577           return the value to be used in the relocation.
    578 
    579     `N'
    580           The symbol is a debugging symbol.
    581 
    582     `p'
    583           The symbols is in a stack unwind section.
    584 
    585     `R'
    586     `r'
    587           The symbol is in a read only data section.
    588 
    589     `S'
    590     `s'
    591           The symbol is in an uninitialized data section for small
    592           objects.
    593 
    594     `T'
    595     `t'
    596           The symbol is in the text (code) section.
    597 
    598     `U'
    599           The symbol is undefined.
    600 
    601     `u'
    602           The symbol is a unique global symbol.  This is a GNU
    603           extension to the standard set of ELF symbol bindings.  For
    604           such a symbol the dynamic linker will make sure that in the
    605           entire process there is just one symbol with this name and
    606           type in use.
    607 
    608     `V'
    609     `v'
    610           The symbol is a weak object.  When a weak defined symbol is
    611           linked with a normal defined symbol, the normal defined
    612           symbol is used with no error.  When a weak undefined symbol
    613           is linked and the symbol is not defined, the value of the
    614           weak symbol becomes zero with no error.  On some systems,
    615           uppercase indicates that a default value has been specified.
    616 
    617     `W'
    618     `w'
    619           The symbol is a weak symbol that has not been specifically
    620           tagged as a weak object symbol.  When a weak defined symbol
    621           is linked with a normal defined symbol, the normal defined
    622           symbol is used with no error.  When a weak undefined symbol
    623           is linked and the symbol is not defined, the value of the
    624           symbol is determined in a system-specific manner without
    625           error.  On some systems, uppercase indicates that a default
    626           value has been specified.
    627 
    628     `-'
    629           The symbol is a stabs symbol in an a.out object file.  In
    630           this case, the next values printed are the stabs other field,
    631           the stabs desc field, and the stab type.  Stabs symbols are
    632           used to hold debugging information.  For more information,
    633           see *note Stabs: (stabs.info)Top.
    634 
    635     `?'
    636           The symbol type is unknown, or object file format specific.
    637 
    638    * The symbol name.
    639 
    640    The long and short forms of options, shown here as alternatives, are
    641 equivalent.
    642 
    643 `-A'
    644 `-o'
    645 `--print-file-name'
    646      Precede each symbol by the name of the input file (or archive
    647      member) in which it was found, rather than identifying the input
    648      file once only, before all of its symbols.
    649 
    650 `-a'
    651 `--debug-syms'
    652      Display all symbols, even debugger-only symbols; normally these
    653      are not listed.
    654 
    655 `-B'
    656      The same as `--format=bsd' (for compatibility with the MIPS `nm').
    657 
    658 `-C'
    659 `--demangle[=STYLE]'
    660      Decode ("demangle") low-level symbol names into user-level names.
    661      Besides removing any initial underscore prepended by the system,
    662      this makes C++ function names readable. Different compilers have
    663      different mangling styles. The optional demangling style argument
    664      can be used to choose an appropriate demangling style for your
    665      compiler. *Note c++filt::, for more information on demangling.
    666 
    667 `--no-demangle'
    668      Do not demangle low-level symbol names.  This is the default.
    669 
    670 `-D'
    671 `--dynamic'
    672      Display the dynamic symbols rather than the normal symbols.  This
    673      is only meaningful for dynamic objects, such as certain types of
    674      shared libraries.
    675 
    676 `-f FORMAT'
    677 `--format=FORMAT'
    678      Use the output format FORMAT, which can be `bsd', `sysv', or
    679      `posix'.  The default is `bsd'.  Only the first character of
    680      FORMAT is significant; it can be either upper or lower case.
    681 
    682 `-g'
    683 `--extern-only'
    684      Display only external symbols.
    685 
    686 `--plugin NAME'
    687      Load the plugin called NAME to add support for extra target types.
    688      This option is only available if the toolchain has been built with
    689      plugin support enabled.
    690 
    691 `-l'
    692 `--line-numbers'
    693      For each symbol, use debugging information to try to find a
    694      filename and line number.  For a defined symbol, look for the line
    695      number of the address of the symbol.  For an undefined symbol,
    696      look for the line number of a relocation entry which refers to the
    697      symbol.  If line number information can be found, print it after
    698      the other symbol information.
    699 
    700 `-n'
    701 `-v'
    702 `--numeric-sort'
    703      Sort symbols numerically by their addresses, rather than
    704      alphabetically by their names.
    705 
    706 `-p'
    707 `--no-sort'
    708      Do not bother to sort the symbols in any order; print them in the
    709      order encountered.
    710 
    711 `-P'
    712 `--portability'
    713      Use the POSIX.2 standard output format instead of the default
    714      format.  Equivalent to `-f posix'.
    715 
    716 `-S'
    717 `--print-size'
    718      Print both value and size of defined symbols for the `bsd' output
    719      style.  This option has no effect for object formats that do not
    720      record symbol sizes, unless `--size-sort' is also used in which
    721      case a calculated size is displayed.
    722 
    723 `-s'
    724 `--print-armap'
    725      When listing symbols from archive members, include the index: a
    726      mapping (stored in the archive by `ar' or `ranlib') of which
    727      modules contain definitions for which names.
    728 
    729 `-r'
    730 `--reverse-sort'
    731      Reverse the order of the sort (whether numeric or alphabetic); let
    732      the last come first.
    733 
    734 `--size-sort'
    735      Sort symbols by size.  The size is computed as the difference
    736      between the value of the symbol and the value of the symbol with
    737      the next higher value.  If the `bsd' output format is used the
    738      size of the symbol is printed, rather than the value, and `-S'
    739      must be used in order both size and value to be printed.
    740 
    741 `--special-syms'
    742      Display symbols which have a target-specific special meaning.
    743      These symbols are usually used by the target for some special
    744      processing and are not normally helpful when included included in
    745      the normal symbol lists.  For example for ARM targets this option
    746      would skip the mapping symbols used to mark transitions between
    747      ARM code, THUMB code and data.
    748 
    749 `-t RADIX'
    750 `--radix=RADIX'
    751      Use RADIX as the radix for printing the symbol values.  It must be
    752      `d' for decimal, `o' for octal, or `x' for hexadecimal.
    753 
    754 `--target=BFDNAME'
    755      Specify an object code format other than your system's default
    756      format.  *Note Target Selection::, for more information.
    757 
    758 `-u'
    759 `--undefined-only'
    760      Display only undefined symbols (those external to each object
    761      file).
    762 
    763 `--defined-only'
    764      Display only defined symbols for each object file.
    765 
    766 `-V'
    767 `--version'
    768      Show the version number of `nm' and exit.
    769 
    770 `-X'
    771      This option is ignored for compatibility with the AIX version of
    772      `nm'.  It takes one parameter which must be the string `32_64'.
    773      The default mode of AIX `nm' corresponds to `-X 32', which is not
    774      supported by GNU `nm'.
    775 
    776 `--help'
    777      Show a summary of the options to `nm' and exit.
    778 
    779 
    780 File: binutils.info,  Node: objcopy,  Next: objdump,  Prev: nm,  Up: Top
    781 
    782 3 objcopy
    783 *********
    784 
    785      objcopy [`-F' BFDNAME|`--target='BFDNAME]
    786              [`-I' BFDNAME|`--input-target='BFDNAME]
    787              [`-O' BFDNAME|`--output-target='BFDNAME]
    788              [`-B' BFDARCH|`--binary-architecture='BFDARCH]
    789              [`-S'|`--strip-all']
    790              [`-g'|`--strip-debug']
    791              [`-K' SYMBOLNAME|`--keep-symbol='SYMBOLNAME]
    792              [`-N' SYMBOLNAME|`--strip-symbol='SYMBOLNAME]
    793              [`--strip-unneeded-symbol='SYMBOLNAME]
    794              [`-G' SYMBOLNAME|`--keep-global-symbol='SYMBOLNAME]
    795              [`--localize-hidden']
    796              [`-L' SYMBOLNAME|`--localize-symbol='SYMBOLNAME]
    797              [`--globalize-symbol='SYMBOLNAME]
    798              [`-W' SYMBOLNAME|`--weaken-symbol='SYMBOLNAME]
    799              [`-w'|`--wildcard']
    800              [`-x'|`--discard-all']
    801              [`-X'|`--discard-locals']
    802              [`-b' BYTE|`--byte='BYTE]
    803              [`-i' [BREADTH]|`--interleave'[=BREADTH]]
    804              [`--interleave-width='WIDTH]
    805              [`-j' SECTIONNAME|`--only-section='SECTIONNAME]
    806              [`-R' SECTIONNAME|`--remove-section='SECTIONNAME]
    807              [`-p'|`--preserve-dates']
    808              [`--debugging']
    809              [`--gap-fill='VAL]
    810              [`--pad-to='ADDRESS]
    811              [`--set-start='VAL]
    812              [`--adjust-start='INCR]
    813              [`--change-addresses='INCR]
    814              [`--change-section-address' SECTION{=,+,-}VAL]
    815              [`--change-section-lma' SECTION{=,+,-}VAL]
    816              [`--change-section-vma' SECTION{=,+,-}VAL]
    817              [`--change-warnings'] [`--no-change-warnings']
    818              [`--set-section-flags' SECTION=FLAGS]
    819              [`--add-section' SECTIONNAME=FILENAME]
    820              [`--rename-section' OLDNAME=NEWNAME[,FLAGS]]
    821              [`--long-section-names' {enable,disable,keep}]
    822              [`--change-leading-char'] [`--remove-leading-char']
    823              [`--reverse-bytes='NUM]
    824              [`--srec-len='IVAL] [`--srec-forceS3']
    825              [`--redefine-sym' OLD=NEW]
    826              [`--redefine-syms='FILENAME]
    827              [`--weaken']
    828              [`--keep-symbols='FILENAME]
    829              [`--strip-symbols='FILENAME]
    830              [`--strip-unneeded-symbols='FILENAME]
    831              [`--keep-global-symbols='FILENAME]
    832              [`--localize-symbols='FILENAME]
    833              [`--globalize-symbols='FILENAME]
    834              [`--weaken-symbols='FILENAME]
    835              [`--alt-machine-code='INDEX]
    836              [`--prefix-symbols='STRING]
    837              [`--prefix-sections='STRING]
    838              [`--prefix-alloc-sections='STRING]
    839              [`--add-gnu-debuglink='PATH-TO-FILE]
    840              [`--keep-file-symbols']
    841              [`--only-keep-debug']
    842              [`--extract-symbol']
    843              [`--writable-text']
    844              [`--readonly-text']
    845              [`--pure']
    846              [`--impure']
    847              [`--file-alignment='NUM]
    848              [`--heap='SIZE]
    849              [`--image-base='ADDRESS]
    850              [`--section-alignment='NUM]
    851              [`--stack='SIZE]
    852              [`--subsystem='WHICH:MAJOR.MINOR]
    853              [`--compress-debug-sections']
    854              [`--decompress-debug-sections']
    855              [`-v'|`--verbose']
    856              [`-V'|`--version']
    857              [`--help'] [`--info']
    858              INFILE [OUTFILE]
    859 
    860    The GNU `objcopy' utility copies the contents of an object file to
    861 another.  `objcopy' uses the GNU BFD Library to read and write the
    862 object files.  It can write the destination object file in a format
    863 different from that of the source object file.  The exact behavior of
    864 `objcopy' is controlled by command-line options.  Note that `objcopy'
    865 should be able to copy a fully linked file between any two formats.
    866 However, copying a relocatable object file between any two formats may
    867 not work as expected.
    868 
    869    `objcopy' creates temporary files to do its translations and deletes
    870 them afterward.  `objcopy' uses BFD to do all its translation work; it
    871 has access to all the formats described in BFD and thus is able to
    872 recognize most formats without being told explicitly.  *Note BFD:
    873 (ld.info)BFD.
    874 
    875    `objcopy' can be used to generate S-records by using an output
    876 target of `srec' (e.g., use `-O srec').
    877 
    878    `objcopy' can be used to generate a raw binary file by using an
    879 output target of `binary' (e.g., use `-O binary').  When `objcopy'
    880 generates a raw binary file, it will essentially produce a memory dump
    881 of the contents of the input object file.  All symbols and relocation
    882 information will be discarded.  The memory dump will start at the load
    883 address of the lowest section copied into the output file.
    884 
    885    When generating an S-record or a raw binary file, it may be helpful
    886 to use `-S' to remove sections containing debugging information.  In
    887 some cases `-R' will be useful to remove sections which contain
    888 information that is not needed by the binary file.
    889 
    890    Note--`objcopy' is not able to change the endianness of its input
    891 files.  If the input format has an endianness (some formats do not),
    892 `objcopy' can only copy the inputs into file formats that have the same
    893 endianness or which have no endianness (e.g., `srec').  (However, see
    894 the `--reverse-bytes' option.)
    895 
    896 `INFILE'
    897 `OUTFILE'
    898      The input and output files, respectively.  If you do not specify
    899      OUTFILE, `objcopy' creates a temporary file and destructively
    900      renames the result with the name of INFILE.
    901 
    902 `-I BFDNAME'
    903 `--input-target=BFDNAME'
    904      Consider the source file's object format to be BFDNAME, rather than
    905      attempting to deduce it.  *Note Target Selection::, for more
    906      information.
    907 
    908 `-O BFDNAME'
    909 `--output-target=BFDNAME'
    910      Write the output file using the object format BFDNAME.  *Note
    911      Target Selection::, for more information.
    912 
    913 `-F BFDNAME'
    914 `--target=BFDNAME'
    915      Use BFDNAME as the object format for both the input and the output
    916      file; i.e., simply transfer data from source to destination with no
    917      translation.  *Note Target Selection::, for more information.
    918 
    919 `-B BFDARCH'
    920 `--binary-architecture=BFDARCH'
    921      Useful when transforming a architecture-less input file into an
    922      object file.  In this case the output architecture can be set to
    923      BFDARCH.  This option will be ignored if the input file has a
    924      known BFDARCH.  You can access this binary data inside a program
    925      by referencing the special symbols that are created by the
    926      conversion process.  These symbols are called
    927      _binary_OBJFILE_start, _binary_OBJFILE_end and
    928      _binary_OBJFILE_size.  e.g. you can transform a picture file into
    929      an object file and then access it in your code using these symbols.
    930 
    931 `-j SECTIONNAME'
    932 `--only-section=SECTIONNAME'
    933      Copy only the named section from the input file to the output file.
    934      This option may be given more than once.  Note that using this
    935      option inappropriately may make the output file unusable.
    936 
    937 `-R SECTIONNAME'
    938 `--remove-section=SECTIONNAME'
    939      Remove any section named SECTIONNAME from the output file.  This
    940      option may be given more than once.  Note that using this option
    941      inappropriately may make the output file unusable.
    942 
    943 `-S'
    944 `--strip-all'
    945      Do not copy relocation and symbol information from the source file.
    946 
    947 `-g'
    948 `--strip-debug'
    949      Do not copy debugging symbols or sections from the source file.
    950 
    951 `--strip-unneeded'
    952      Strip all symbols that are not needed for relocation processing.
    953 
    954 `-K SYMBOLNAME'
    955 `--keep-symbol=SYMBOLNAME'
    956      When stripping symbols, keep symbol SYMBOLNAME even if it would
    957      normally be stripped.  This option may be given more than once.
    958 
    959 `-N SYMBOLNAME'
    960 `--strip-symbol=SYMBOLNAME'
    961      Do not copy symbol SYMBOLNAME from the source file.  This option
    962      may be given more than once.
    963 
    964 `--strip-unneeded-symbol=SYMBOLNAME'
    965      Do not copy symbol SYMBOLNAME from the source file unless it is
    966      needed by a relocation.  This option may be given more than once.
    967 
    968 `-G SYMBOLNAME'
    969 `--keep-global-symbol=SYMBOLNAME'
    970      Keep only symbol SYMBOLNAME global.  Make all other symbols local
    971      to the file, so that they are not visible externally.  This option
    972      may be given more than once.
    973 
    974 `--localize-hidden'
    975      In an ELF object, mark all symbols that have hidden or internal
    976      visibility as local.  This option applies on top of
    977      symbol-specific localization options such as `-L'.
    978 
    979 `-L SYMBOLNAME'
    980 `--localize-symbol=SYMBOLNAME'
    981      Make symbol SYMBOLNAME local to the file, so that it is not
    982      visible externally.  This option may be given more than once.
    983 
    984 `-W SYMBOLNAME'
    985 `--weaken-symbol=SYMBOLNAME'
    986      Make symbol SYMBOLNAME weak. This option may be given more than
    987      once.
    988 
    989 `--globalize-symbol=SYMBOLNAME'
    990      Give symbol SYMBOLNAME global scoping so that it is visible
    991      outside of the file in which it is defined.  This option may be
    992      given more than once.
    993 
    994 `-w'
    995 `--wildcard'
    996      Permit regular expressions in SYMBOLNAMEs used in other command
    997      line options.  The question mark (?), asterisk (*), backslash (\)
    998      and square brackets ([]) operators can be used anywhere in the
    999      symbol name.  If the first character of the symbol name is the
   1000      exclamation point (!) then the sense of the switch is reversed for
   1001      that symbol.  For example:
   1002 
   1003             -w -W !foo -W fo*
   1004 
   1005      would cause objcopy to weaken all symbols that start with "fo"
   1006      except for the symbol "foo".
   1007 
   1008 `-x'
   1009 `--discard-all'
   1010      Do not copy non-global symbols from the source file.
   1011 
   1012 `-X'
   1013 `--discard-locals'
   1014      Do not copy compiler-generated local symbols.  (These usually
   1015      start with `L' or `.'.)
   1016 
   1017 `-b BYTE'
   1018 `--byte=BYTE'
   1019      If interleaving has been enabled via the `--interleave' option
   1020      then start the range of bytes to keep at the BYTEth byte.  BYTE
   1021      can be in the range from 0 to BREADTH-1, where BREADTH is the
   1022      value given by the `--interleave' option.
   1023 
   1024 `-i [BREADTH]'
   1025 `--interleave[=BREADTH]'
   1026      Only copy a range out of every BREADTH bytes.  (Header data is not
   1027      affected).  Select which byte in the range begins the copy with
   1028      the `--byte' option.  Select the width of the range with the
   1029      `--interleave-width' option.
   1030 
   1031      This option is useful for creating files to program ROM.  It is
   1032      typically used with an `srec' output target.  Note that `objcopy'
   1033      will complain if you do not specify the `--byte' option as well.
   1034 
   1035      The default interleave breadth is 4, so with `--byte' set to 0,
   1036      `objcopy' would copy the first byte out of every four bytes from
   1037      the input to the output.
   1038 
   1039 `--interleave-width=WIDTH'
   1040      When used with the `--interleave' option, copy WIDTH bytes at a
   1041      time.  The start of the range of bytes to be copied is set by the
   1042      `--byte' option, and the extent of the range is set with the
   1043      `--interleave' option.
   1044 
   1045      The default value for this option is 1.  The value of WIDTH plus
   1046      the BYTE value set by the `--byte' option must not exceed the
   1047      interleave breadth set by the `--interleave' option.
   1048 
   1049      This option can be used to create images for two 16-bit flashes
   1050      interleaved in a 32-bit bus by passing `-b 0 -i 4
   1051      --interleave-width=2' and `-b 2 -i 4 --interleave-width=2' to two
   1052      `objcopy' commands.  If the input was '12345678' then the outputs
   1053      would be '1256' and '3478' respectively.
   1054 
   1055 `-p'
   1056 `--preserve-dates'
   1057      Set the access and modification dates of the output file to be the
   1058      same as those of the input file.
   1059 
   1060 `--debugging'
   1061      Convert debugging information, if possible.  This is not the
   1062      default because only certain debugging formats are supported, and
   1063      the conversion process can be time consuming.
   1064 
   1065 `--gap-fill VAL'
   1066      Fill gaps between sections with VAL.  This operation applies to
   1067      the _load address_ (LMA) of the sections.  It is done by increasing
   1068      the size of the section with the lower address, and filling in the
   1069      extra space created with VAL.
   1070 
   1071 `--pad-to ADDRESS'
   1072      Pad the output file up to the load address ADDRESS.  This is done
   1073      by increasing the size of the last section.  The extra space is
   1074      filled in with the value specified by `--gap-fill' (default zero).
   1075 
   1076 `--set-start VAL'
   1077      Set the start address of the new file to VAL.  Not all object file
   1078      formats support setting the start address.
   1079 
   1080 `--change-start INCR'
   1081 `--adjust-start INCR'
   1082      Change the start address by adding INCR.  Not all object file
   1083      formats support setting the start address.
   1084 
   1085 `--change-addresses INCR'
   1086 `--adjust-vma INCR'
   1087      Change the VMA and LMA addresses of all sections, as well as the
   1088      start address, by adding INCR.  Some object file formats do not
   1089      permit section addresses to be changed arbitrarily.  Note that
   1090      this does not relocate the sections; if the program expects
   1091      sections to be loaded at a certain address, and this option is
   1092      used to change the sections such that they are loaded at a
   1093      different address, the program may fail.
   1094 
   1095 `--change-section-address SECTION{=,+,-}VAL'
   1096 `--adjust-section-vma SECTION{=,+,-}VAL'
   1097      Set or change both the VMA address and the LMA address of the named
   1098      SECTION.  If `=' is used, the section address is set to VAL.
   1099      Otherwise, VAL is added to or subtracted from the section address.
   1100      See the comments under `--change-addresses', above. If SECTION
   1101      does not exist in the input file, a warning will be issued, unless
   1102      `--no-change-warnings' is used.
   1103 
   1104 `--change-section-lma SECTION{=,+,-}VAL'
   1105      Set or change the LMA address of the named SECTION.  The LMA
   1106      address is the address where the section will be loaded into
   1107      memory at program load time.  Normally this is the same as the VMA
   1108      address, which is the address of the section at program run time,
   1109      but on some systems, especially those where a program is held in
   1110      ROM, the two can be different.  If `=' is used, the section
   1111      address is set to VAL.  Otherwise, VAL is added to or subtracted
   1112      from the section address.  See the comments under
   1113      `--change-addresses', above.  If SECTION does not exist in the
   1114      input file, a warning will be issued, unless
   1115      `--no-change-warnings' is used.
   1116 
   1117 `--change-section-vma SECTION{=,+,-}VAL'
   1118      Set or change the VMA address of the named SECTION.  The VMA
   1119      address is the address where the section will be located once the
   1120      program has started executing.  Normally this is the same as the
   1121      LMA address, which is the address where the section will be loaded
   1122      into memory, but on some systems, especially those where a program
   1123      is held in ROM, the two can be different.  If `=' is used, the
   1124      section address is set to VAL.  Otherwise, VAL is added to or
   1125      subtracted from the section address.  See the comments under
   1126      `--change-addresses', above.  If SECTION does not exist in the
   1127      input file, a warning will be issued, unless
   1128      `--no-change-warnings' is used.
   1129 
   1130 `--change-warnings'
   1131 `--adjust-warnings'
   1132      If `--change-section-address' or `--change-section-lma' or
   1133      `--change-section-vma' is used, and the named section does not
   1134      exist, issue a warning.  This is the default.
   1135 
   1136 `--no-change-warnings'
   1137 `--no-adjust-warnings'
   1138      Do not issue a warning if `--change-section-address' or
   1139      `--adjust-section-lma' or `--adjust-section-vma' is used, even if
   1140      the named section does not exist.
   1141 
   1142 `--set-section-flags SECTION=FLAGS'
   1143      Set the flags for the named section.  The FLAGS argument is a
   1144      comma separated string of flag names.  The recognized names are
   1145      `alloc', `contents', `load', `noload', `readonly', `code', `data',
   1146      `rom', `share', and `debug'.  You can set the `contents' flag for
   1147      a section which does not have contents, but it is not meaningful
   1148      to clear the `contents' flag of a section which does have
   1149      contents-just remove the section instead.  Not all flags are
   1150      meaningful for all object file formats.
   1151 
   1152 `--add-section SECTIONNAME=FILENAME'
   1153      Add a new section named SECTIONNAME while copying the file.  The
   1154      contents of the new section are taken from the file FILENAME.  The
   1155      size of the section will be the size of the file.  This option only
   1156      works on file formats which can support sections with arbitrary
   1157      names.
   1158 
   1159 `--rename-section OLDNAME=NEWNAME[,FLAGS]'
   1160      Rename a section from OLDNAME to NEWNAME, optionally changing the
   1161      section's flags to FLAGS in the process.  This has the advantage
   1162      over usng a linker script to perform the rename in that the output
   1163      stays as an object file and does not become a linked executable.
   1164 
   1165      This option is particularly helpful when the input format is
   1166      binary, since this will always create a section called .data.  If
   1167      for example, you wanted instead to create a section called .rodata
   1168      containing binary data you could use the following command line to
   1169      achieve it:
   1170 
   1171             objcopy -I binary -O <output_format> -B <architecture> \
   1172              --rename-section .data=.rodata,alloc,load,readonly,data,contents \
   1173              <input_binary_file> <output_object_file>
   1174 
   1175 `--long-section-names {enable,disable,keep}'
   1176      Controls the handling of long section names when processing `COFF'
   1177      and `PE-COFF' object formats.  The default behaviour, `keep', is
   1178      to preserve long section names if any are present in the input
   1179      file.  The `enable' and `disable' options forcibly enable or
   1180      disable the use of long section names in the output object; when
   1181      `disable' is in effect, any long section names in the input object
   1182      will be truncated.  The `enable' option will only emit long
   1183      section names if any are present in the inputs; this is mostly the
   1184      same as `keep', but it is left undefined whether the `enable'
   1185      option might force the creation of an empty string table in the
   1186      output file.
   1187 
   1188 `--change-leading-char'
   1189      Some object file formats use special characters at the start of
   1190      symbols.  The most common such character is underscore, which
   1191      compilers often add before every symbol.  This option tells
   1192      `objcopy' to change the leading character of every symbol when it
   1193      converts between object file formats.  If the object file formats
   1194      use the same leading character, this option has no effect.
   1195      Otherwise, it will add a character, or remove a character, or
   1196      change a character, as appropriate.
   1197 
   1198 `--remove-leading-char'
   1199      If the first character of a global symbol is a special symbol
   1200      leading character used by the object file format, remove the
   1201      character.  The most common symbol leading character is
   1202      underscore.  This option will remove a leading underscore from all
   1203      global symbols.  This can be useful if you want to link together
   1204      objects of different file formats with different conventions for
   1205      symbol names.  This is different from `--change-leading-char'
   1206      because it always changes the symbol name when appropriate,
   1207      regardless of the object file format of the output file.
   1208 
   1209 `--reverse-bytes=NUM'
   1210      Reverse the bytes in a section with output contents.  A section
   1211      length must be evenly divisible by the value given in order for
   1212      the swap to be able to take place. Reversing takes place before
   1213      the interleaving is performed.
   1214 
   1215      This option is used typically in generating ROM images for
   1216      problematic target systems.  For example, on some target boards,
   1217      the 32-bit words fetched from 8-bit ROMs are re-assembled in
   1218      little-endian byte order regardless of the CPU byte order.
   1219      Depending on the programming model, the endianness of the ROM may
   1220      need to be modified.
   1221 
   1222      Consider a simple file with a section containing the following
   1223      eight bytes:  `12345678'.
   1224 
   1225      Using `--reverse-bytes=2' for the above example, the bytes in the
   1226      output file would be ordered `21436587'.
   1227 
   1228      Using `--reverse-bytes=4' for the above example, the bytes in the
   1229      output file would be ordered `43218765'.
   1230 
   1231      By using `--reverse-bytes=2' for the above example, followed by
   1232      `--reverse-bytes=4' on the output file, the bytes in the second
   1233      output file would be ordered `34127856'.
   1234 
   1235 `--srec-len=IVAL'
   1236      Meaningful only for srec output.  Set the maximum length of the
   1237      Srecords being produced to IVAL.  This length covers both address,
   1238      data and crc fields.
   1239 
   1240 `--srec-forceS3'
   1241      Meaningful only for srec output.  Avoid generation of S1/S2
   1242      records, creating S3-only record format.
   1243 
   1244 `--redefine-sym OLD=NEW'
   1245      Change the name of a symbol OLD, to NEW.  This can be useful when
   1246      one is trying link two things together for which you have no
   1247      source, and there are name collisions.
   1248 
   1249 `--redefine-syms=FILENAME'
   1250      Apply `--redefine-sym' to each symbol pair "OLD NEW" listed in the
   1251      file FILENAME.  FILENAME is simply a flat file, with one symbol
   1252      pair per line.  Line comments may be introduced by the hash
   1253      character.  This option may be given more than once.
   1254 
   1255 `--weaken'
   1256      Change all global symbols in the file to be weak.  This can be
   1257      useful when building an object which will be linked against other
   1258      objects using the `-R' option to the linker.  This option is only
   1259      effective when using an object file format which supports weak
   1260      symbols.
   1261 
   1262 `--keep-symbols=FILENAME'
   1263      Apply `--keep-symbol' option to each symbol listed in the file
   1264      FILENAME.  FILENAME is simply a flat file, with one symbol name
   1265      per line.  Line comments may be introduced by the hash character.
   1266      This option may be given more than once.
   1267 
   1268 `--strip-symbols=FILENAME'
   1269      Apply `--strip-symbol' option to each symbol listed in the file
   1270      FILENAME.  FILENAME is simply a flat file, with one symbol name
   1271      per line.  Line comments may be introduced by the hash character.
   1272      This option may be given more than once.
   1273 
   1274 `--strip-unneeded-symbols=FILENAME'
   1275      Apply `--strip-unneeded-symbol' option to each symbol listed in
   1276      the file FILENAME.  FILENAME is simply a flat file, with one
   1277      symbol name per line.  Line comments may be introduced by the hash
   1278      character.  This option may be given more than once.
   1279 
   1280 `--keep-global-symbols=FILENAME'
   1281      Apply `--keep-global-symbol' option to each symbol listed in the
   1282      file FILENAME.  FILENAME is simply a flat file, with one symbol
   1283      name per line.  Line comments may be introduced by the hash
   1284      character.  This option may be given more than once.
   1285 
   1286 `--localize-symbols=FILENAME'
   1287      Apply `--localize-symbol' option to each symbol listed in the file
   1288      FILENAME.  FILENAME is simply a flat file, with one symbol name
   1289      per line.  Line comments may be introduced by the hash character.
   1290      This option may be given more than once.
   1291 
   1292 `--globalize-symbols=FILENAME'
   1293      Apply `--globalize-symbol' option to each symbol listed in the file
   1294      FILENAME.  FILENAME is simply a flat file, with one symbol name
   1295      per line.  Line comments may be introduced by the hash character.
   1296      This option may be given more than once.
   1297 
   1298 `--weaken-symbols=FILENAME'
   1299      Apply `--weaken-symbol' option to each symbol listed in the file
   1300      FILENAME.  FILENAME is simply a flat file, with one symbol name
   1301      per line.  Line comments may be introduced by the hash character.
   1302      This option may be given more than once.
   1303 
   1304 `--alt-machine-code=INDEX'
   1305      If the output architecture has alternate machine codes, use the
   1306      INDEXth code instead of the default one.  This is useful in case a
   1307      machine is assigned an official code and the tool-chain adopts the
   1308      new code, but other applications still depend on the original code
   1309      being used.  For ELF based architectures if the INDEX alternative
   1310      does not exist then the value is treated as an absolute number to
   1311      be stored in the e_machine field of the ELF header.
   1312 
   1313 `--writable-text'
   1314      Mark the output text as writable.  This option isn't meaningful
   1315      for all object file formats.
   1316 
   1317 `--readonly-text'
   1318      Make the output text write protected.  This option isn't
   1319      meaningful for all object file formats.
   1320 
   1321 `--pure'
   1322      Mark the output file as demand paged.  This option isn't
   1323      meaningful for all object file formats.
   1324 
   1325 `--impure'
   1326      Mark the output file as impure.  This option isn't meaningful for
   1327      all object file formats.
   1328 
   1329 `--prefix-symbols=STRING'
   1330      Prefix all symbols in the output file with STRING.
   1331 
   1332 `--prefix-sections=STRING'
   1333      Prefix all section names in the output file with STRING.
   1334 
   1335 `--prefix-alloc-sections=STRING'
   1336      Prefix all the names of all allocated sections in the output file
   1337      with STRING.
   1338 
   1339 `--add-gnu-debuglink=PATH-TO-FILE'
   1340      Creates a .gnu_debuglink section which contains a reference to
   1341      PATH-TO-FILE and adds it to the output file.
   1342 
   1343 `--keep-file-symbols'
   1344      When stripping a file, perhaps with `--strip-debug' or
   1345      `--strip-unneeded', retain any symbols specifying source file
   1346      names, which would otherwise get stripped.
   1347 
   1348 `--only-keep-debug'
   1349      Strip a file, removing contents of any sections that would not be
   1350      stripped by `--strip-debug' and leaving the debugging sections
   1351      intact.  In ELF files, this preserves all note sections in the
   1352      output.
   1353 
   1354      The intention is that this option will be used in conjunction with
   1355      `--add-gnu-debuglink' to create a two part executable.  One a
   1356      stripped binary which will occupy less space in RAM and in a
   1357      distribution and the second a debugging information file which is
   1358      only needed if debugging abilities are required.  The suggested
   1359      procedure to create these files is as follows:
   1360 
   1361        1. Link the executable as normal.  Assuming that is is called
   1362           `foo' then...
   1363 
   1364        2. Run `objcopy --only-keep-debug foo foo.dbg' to create a file
   1365           containing the debugging info.
   1366 
   1367        3. Run `objcopy --strip-debug foo' to create a stripped
   1368           executable.
   1369 
   1370        4. Run `objcopy --add-gnu-debuglink=foo.dbg foo' to add a link
   1371           to the debugging info into the stripped executable.
   1372 
   1373      Note--the choice of `.dbg' as an extension for the debug info file
   1374      is arbitrary.  Also the `--only-keep-debug' step is optional.  You
   1375      could instead do this:
   1376 
   1377        1. Link the executable as normal.
   1378 
   1379        2. Copy `foo' to  `foo.full'
   1380 
   1381        3. Run `objcopy --strip-debug foo'
   1382 
   1383        4. Run `objcopy --add-gnu-debuglink=foo.full foo'
   1384 
   1385      i.e., the file pointed to by the `--add-gnu-debuglink' can be the
   1386      full executable.  It does not have to be a file created by the
   1387      `--only-keep-debug' switch.
   1388 
   1389      Note--this switch is only intended for use on fully linked files.
   1390      It does not make sense to use it on object files where the
   1391      debugging information may be incomplete.  Besides the
   1392      gnu_debuglink feature currently only supports the presence of one
   1393      filename containing debugging information, not multiple filenames
   1394      on a one-per-object-file basis.
   1395 
   1396 `--file-alignment NUM'
   1397      Specify the file alignment.  Sections in the file will always
   1398      begin at file offsets which are multiples of this number.  This
   1399      defaults to 512.  [This option is specific to PE targets.]
   1400 
   1401 `--heap RESERVE'
   1402 `--heap RESERVE,COMMIT'
   1403      Specify the number of bytes of memory to reserve (and optionally
   1404      commit) to be used as heap for this program.  [This option is
   1405      specific to PE targets.]
   1406 
   1407 `--image-base VALUE'
   1408      Use VALUE as the base address of your program or dll.  This is the
   1409      lowest memory location that will be used when your program or dll
   1410      is loaded.  To reduce the need to relocate and improve performance
   1411      of your dlls, each should have a unique base address and not
   1412      overlap any other dlls.  The default is 0x400000 for executables,
   1413      and 0x10000000 for dlls.  [This option is specific to PE targets.]
   1414 
   1415 `--section-alignment NUM'
   1416      Sets the section alignment.  Sections in memory will always begin
   1417      at addresses which are a multiple of this number.  Defaults to
   1418      0x1000.  [This option is specific to PE targets.]
   1419 
   1420 `--stack RESERVE'
   1421 `--stack RESERVE,COMMIT'
   1422      Specify the number of bytes of memory to reserve (and optionally
   1423      commit) to be used as stack for this program.  [This option is
   1424      specific to PE targets.]
   1425 
   1426 `--subsystem WHICH'
   1427 `--subsystem WHICH:MAJOR'
   1428 `--subsystem WHICH:MAJOR.MINOR'
   1429      Specifies the subsystem under which your program will execute.  The
   1430      legal values for WHICH are `native', `windows', `console',
   1431      `posix', `efi-app', `efi-bsd', `efi-rtd', `sal-rtd', and `xbox'.
   1432      You may optionally set the subsystem version also.  Numeric values
   1433      are also accepted for WHICH.  [This option is specific to PE
   1434      targets.]
   1435 
   1436 `--extract-symbol'
   1437      Keep the file's section flags and symbols but remove all section
   1438      data.  Specifically, the option:
   1439 
   1440         * removes the contents of all sections;
   1441 
   1442         * sets the size of every section to zero; and
   1443 
   1444         * sets the file's start address to zero.
   1445 
   1446      This option is used to build a `.sym' file for a VxWorks kernel.
   1447      It can also be a useful way of reducing the size of a
   1448      `--just-symbols' linker input file.
   1449 
   1450 `--compress-debug-sections'
   1451      Compress DWARF debug sections using zlib.
   1452 
   1453 `--decompress-debug-sections'
   1454      Decompress DWARF debug sections using zlib.
   1455 
   1456 `-V'
   1457 `--version'
   1458      Show the version number of `objcopy'.
   1459 
   1460 `-v'
   1461 `--verbose'
   1462      Verbose output: list all object files modified.  In the case of
   1463      archives, `objcopy -V' lists all members of the archive.
   1464 
   1465 `--help'
   1466      Show a summary of the options to `objcopy'.
   1467 
   1468 `--info'
   1469      Display a list showing all architectures and object formats
   1470      available.
   1471 
   1472 
   1473 File: binutils.info,  Node: objdump,  Next: ranlib,  Prev: objcopy,  Up: Top
   1474 
   1475 4 objdump
   1476 *********
   1477 
   1478      objdump [`-a'|`--archive-headers']
   1479              [`-b' BFDNAME|`--target=BFDNAME']
   1480              [`-C'|`--demangle'[=STYLE] ]
   1481              [`-d'|`--disassemble']
   1482              [`-D'|`--disassemble-all']
   1483              [`-z'|`--disassemble-zeroes']
   1484              [`-EB'|`-EL'|`--endian='{big | little }]
   1485              [`-f'|`--file-headers']
   1486              [`-F'|`--file-offsets']
   1487              [`--file-start-context']
   1488              [`-g'|`--debugging']
   1489              [`-e'|`--debugging-tags']
   1490              [`-h'|`--section-headers'|`--headers']
   1491              [`-i'|`--info']
   1492              [`-j' SECTION|`--section='SECTION]
   1493              [`-l'|`--line-numbers']
   1494              [`-S'|`--source']
   1495              [`-m' MACHINE|`--architecture='MACHINE]
   1496              [`-M' OPTIONS|`--disassembler-options='OPTIONS]
   1497              [`-p'|`--private-headers']
   1498              [`-r'|`--reloc']
   1499              [`-R'|`--dynamic-reloc']
   1500              [`-s'|`--full-contents']
   1501              [`-W[lLiaprmfFsoRt]'|
   1502               `--dwarf'[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges]]
   1503              [`-G'|`--stabs']
   1504              [`-t'|`--syms']
   1505              [`-T'|`--dynamic-syms']
   1506              [`-x'|`--all-headers']
   1507              [`-w'|`--wide']
   1508              [`--start-address='ADDRESS]
   1509              [`--stop-address='ADDRESS]
   1510              [`--prefix-addresses']
   1511              [`--[no-]show-raw-insn']
   1512              [`--adjust-vma='OFFSET]
   1513              [`--special-syms']
   1514              [`--prefix='PREFIX]
   1515              [`--prefix-strip='LEVEL]
   1516              [`--insn-width='WIDTH]
   1517              [`-V'|`--version']
   1518              [`-H'|`--help']
   1519              OBJFILE...
   1520 
   1521    `objdump' displays information about one or more object files.  The
   1522 options control what particular information to display.  This
   1523 information is mostly useful to programmers who are working on the
   1524 compilation tools, as opposed to programmers who just want their
   1525 program to compile and work.
   1526 
   1527    OBJFILE... are the object files to be examined.  When you specify
   1528 archives, `objdump' shows information on each of the member object
   1529 files.
   1530 
   1531    The long and short forms of options, shown here as alternatives, are
   1532 equivalent.  At least one option from the list
   1533 `-a,-d,-D,-e,-f,-g,-G,-h,-H,-p,-r,-R,-s,-S,-t,-T,-V,-x' must be given.
   1534 
   1535 `-a'
   1536 `--archive-header'
   1537      If any of the OBJFILE files are archives, display the archive
   1538      header information (in a format similar to `ls -l').  Besides the
   1539      information you could list with `ar tv', `objdump -a' shows the
   1540      object file format of each archive member.
   1541 
   1542 `--adjust-vma=OFFSET'
   1543      When dumping information, first add OFFSET to all the section
   1544      addresses.  This is useful if the section addresses do not
   1545      correspond to the symbol table, which can happen when putting
   1546      sections at particular addresses when using a format which can not
   1547      represent section addresses, such as a.out.
   1548 
   1549 `-b BFDNAME'
   1550 `--target=BFDNAME'
   1551      Specify that the object-code format for the object files is
   1552      BFDNAME.  This option may not be necessary; OBJDUMP can
   1553      automatically recognize many formats.
   1554 
   1555      For example,
   1556           objdump -b oasys -m vax -h fu.o
   1557      displays summary information from the section headers (`-h') of
   1558      `fu.o', which is explicitly identified (`-m') as a VAX object file
   1559      in the format produced by Oasys compilers.  You can list the
   1560      formats available with the `-i' option.  *Note Target Selection::,
   1561      for more information.
   1562 
   1563 `-C'
   1564 `--demangle[=STYLE]'
   1565      Decode ("demangle") low-level symbol names into user-level names.
   1566      Besides removing any initial underscore prepended by the system,
   1567      this makes C++ function names readable.  Different compilers have
   1568      different mangling styles. The optional demangling style argument
   1569      can be used to choose an appropriate demangling style for your
   1570      compiler. *Note c++filt::, for more information on demangling.
   1571 
   1572 `-g'
   1573 `--debugging'
   1574      Display debugging information.  This attempts to parse STABS and
   1575      IEEE debugging format information stored in the file and print it
   1576      out using a C like syntax.  If neither of these formats are found
   1577      this option falls back on the `-W' option to print any DWARF
   1578      information in the file.
   1579 
   1580 `-e'
   1581 `--debugging-tags'
   1582      Like `-g', but the information is generated in a format compatible
   1583      with ctags tool.
   1584 
   1585 `-d'
   1586 `--disassemble'
   1587      Display the assembler mnemonics for the machine instructions from
   1588      OBJFILE.  This option only disassembles those sections which are
   1589      expected to contain instructions.
   1590 
   1591 `-D'
   1592 `--disassemble-all'
   1593      Like `-d', but disassemble the contents of all sections, not just
   1594      those expected to contain instructions.
   1595 
   1596      If the target is an ARM architecture this switch also has the
   1597      effect of forcing the disassembler to decode pieces of data found
   1598      in code sections as if they were instructions.
   1599 
   1600 `--prefix-addresses'
   1601      When disassembling, print the complete address on each line.  This
   1602      is the older disassembly format.
   1603 
   1604 `-EB'
   1605 `-EL'
   1606 `--endian={big|little}'
   1607      Specify the endianness of the object files.  This only affects
   1608      disassembly.  This can be useful when disassembling a file format
   1609      which does not describe endianness information, such as S-records.
   1610 
   1611 `-f'
   1612 `--file-headers'
   1613      Display summary information from the overall header of each of the
   1614      OBJFILE files.
   1615 
   1616 `-F'
   1617 `--file-offsets'
   1618      When disassembling sections, whenever a symbol is displayed, also
   1619      display the file offset of the region of data that is about to be
   1620      dumped.  If zeroes are being skipped, then when disassembly
   1621      resumes, tell the user how many zeroes were skipped and the file
   1622      offset of the location from where the disassembly resumes.  When
   1623      dumping sections, display the file offset of the location from
   1624      where the dump starts.
   1625 
   1626 `--file-start-context'
   1627      Specify that when displaying interlisted source code/disassembly
   1628      (assumes `-S') from a file that has not yet been displayed, extend
   1629      the context to the start of the file.
   1630 
   1631 `-h'
   1632 `--section-headers'
   1633 `--headers'
   1634      Display summary information from the section headers of the object
   1635      file.
   1636 
   1637      File segments may be relocated to nonstandard addresses, for
   1638      example by using the `-Ttext', `-Tdata', or `-Tbss' options to
   1639      `ld'.  However, some object file formats, such as a.out, do not
   1640      store the starting address of the file segments.  In those
   1641      situations, although `ld' relocates the sections correctly, using
   1642      `objdump -h' to list the file section headers cannot show the
   1643      correct addresses.  Instead, it shows the usual addresses, which
   1644      are implicit for the target.
   1645 
   1646 `-H'
   1647 `--help'
   1648      Print a summary of the options to `objdump' and exit.
   1649 
   1650 `-i'
   1651 `--info'
   1652      Display a list showing all architectures and object formats
   1653      available for specification with `-b' or `-m'.
   1654 
   1655 `-j NAME'
   1656 `--section=NAME'
   1657      Display information only for section NAME.
   1658 
   1659 `-l'
   1660 `--line-numbers'
   1661      Label the display (using debugging information) with the filename
   1662      and source line numbers corresponding to the object code or relocs
   1663      shown.  Only useful with `-d', `-D', or `-r'.
   1664 
   1665 `-m MACHINE'
   1666 `--architecture=MACHINE'
   1667      Specify the architecture to use when disassembling object files.
   1668      This can be useful when disassembling object files which do not
   1669      describe architecture information, such as S-records.  You can
   1670      list the available architectures with the `-i' option.
   1671 
   1672      If the target is an ARM architecture then this switch has an
   1673      additional effect.  It restricts the disassembly to only those
   1674      instructions supported by the architecture specified by MACHINE.
   1675      If it is necessary to use this switch because the input file does
   1676      not contain any architecture information, but it is also desired to
   1677      disassemble all the instructions use `-marm'.
   1678 
   1679 `-M OPTIONS'
   1680 `--disassembler-options=OPTIONS'
   1681      Pass target specific information to the disassembler.  Only
   1682      supported on some targets.  If it is necessary to specify more
   1683      than one disassembler option then multiple `-M' options can be
   1684      used or can be placed together into a comma separated list.
   1685 
   1686      If the target is an ARM architecture then this switch can be used
   1687      to select which register name set is used during disassembler.
   1688      Specifying `-M reg-names-std' (the default) will select the
   1689      register names as used in ARM's instruction set documentation, but
   1690      with register 13 called 'sp', register 14 called 'lr' and register
   1691      15 called 'pc'.  Specifying `-M reg-names-apcs' will select the
   1692      name set used by the ARM Procedure Call Standard, whilst
   1693      specifying `-M reg-names-raw' will just use `r' followed by the
   1694      register number.
   1695 
   1696      There are also two variants on the APCS register naming scheme
   1697      enabled by `-M reg-names-atpcs' and `-M reg-names-special-atpcs'
   1698      which use the ARM/Thumb Procedure Call Standard naming
   1699      conventions.  (Either with the normal register names or the
   1700      special register names).
   1701 
   1702      This option can also be used for ARM architectures to force the
   1703      disassembler to interpret all instructions as Thumb instructions by
   1704      using the switch `--disassembler-options=force-thumb'.  This can be
   1705      useful when attempting to disassemble thumb code produced by other
   1706      compilers.
   1707 
   1708      For the x86, some of the options duplicate functions of the `-m'
   1709      switch, but allow finer grained control.  Multiple selections from
   1710      the following may be specified as a comma separated string.
   1711      `x86-64', `i386' and `i8086' select disassembly for the given
   1712      architecture.  `intel' and `att' select between intel syntax mode
   1713      and AT&T syntax mode.  `intel-mnemonic' and `att-mnemonic' select
   1714      between intel mnemonic mode and AT&T mnemonic mode.
   1715      `intel-mnemonic' implies `intel' and `att-mnemonic' implies `att'.
   1716      `addr64', `addr32', `addr16', `data32' and `data16' specify the
   1717      default address size and operand size.  These four options will be
   1718      overridden if `x86-64', `i386' or `i8086' appear later in the
   1719      option string.  Lastly, `suffix', when in AT&T mode, instructs the
   1720      disassembler to print a mnemonic suffix even when the suffix could
   1721      be inferred by the operands.
   1722 
   1723      For PowerPC, `booke' controls the disassembly of BookE
   1724      instructions.  `32' and `64' select PowerPC and PowerPC64
   1725      disassembly, respectively.  `e300' selects disassembly for the
   1726      e300 family.  `440' selects disassembly for the PowerPC 440.
   1727      `ppcps' selects disassembly for the paired single instructions of
   1728      the PPC750CL.
   1729 
   1730      For MIPS, this option controls the printing of instruction mnemonic
   1731      names and register names in disassembled instructions.  Multiple
   1732      selections from the following may be specified as a comma separated
   1733      string, and invalid options are ignored:
   1734 
   1735     `no-aliases'
   1736           Print the 'raw' instruction mnemonic instead of some pseudo
   1737           instruction mnemonic.  I.e., print 'daddu' or 'or' instead of
   1738           'move', 'sll' instead of 'nop', etc.
   1739 
   1740     `gpr-names=ABI'
   1741           Print GPR (general-purpose register) names as appropriate for
   1742           the specified ABI.  By default, GPR names are selected
   1743           according to the ABI of the binary being disassembled.
   1744 
   1745     `fpr-names=ABI'
   1746           Print FPR (floating-point register) names as appropriate for
   1747           the specified ABI.  By default, FPR numbers are printed
   1748           rather than names.
   1749 
   1750     `cp0-names=ARCH'
   1751           Print CP0 (system control coprocessor; coprocessor 0)
   1752           register names as appropriate for the CPU or architecture
   1753           specified by ARCH.  By default, CP0 register names are
   1754           selected according to the architecture and CPU of the binary
   1755           being disassembled.
   1756 
   1757     `hwr-names=ARCH'
   1758           Print HWR (hardware register, used by the `rdhwr'
   1759           instruction) names as appropriate for the CPU or architecture
   1760           specified by ARCH.  By default, HWR names are selected
   1761           according to the architecture and CPU of the binary being
   1762           disassembled.
   1763 
   1764     `reg-names=ABI'
   1765           Print GPR and FPR names as appropriate for the selected ABI.
   1766 
   1767     `reg-names=ARCH'
   1768           Print CPU-specific register names (CP0 register and HWR names)
   1769           as appropriate for the selected CPU or architecture.
   1770 
   1771      For any of the options listed above, ABI or ARCH may be specified
   1772      as `numeric' to have numbers printed rather than names, for the
   1773      selected types of registers.  You can list the available values of
   1774      ABI and ARCH using the `--help' option.
   1775 
   1776      For VAX, you can specify function entry addresses with `-M
   1777      entry:0xf00ba'.  You can use this multiple times to properly
   1778      disassemble VAX binary files that don't contain symbol tables (like
   1779      ROM dumps).  In these cases, the function entry mask would
   1780      otherwise be decoded as VAX instructions, which would probably
   1781      lead the rest of the function being wrongly disassembled.
   1782 
   1783 `-p'
   1784 `--private-headers'
   1785      Print information that is specific to the object file format.  The
   1786      exact information printed depends upon the object file format.
   1787      For some object file formats, no additional information is printed.
   1788 
   1789 `-r'
   1790 `--reloc'
   1791      Print the relocation entries of the file.  If used with `-d' or
   1792      `-D', the relocations are printed interspersed with the
   1793      disassembly.
   1794 
   1795 `-R'
   1796 `--dynamic-reloc'
   1797      Print the dynamic relocation entries of the file.  This is only
   1798      meaningful for dynamic objects, such as certain types of shared
   1799      libraries.  As for `-r', if used with `-d' or `-D', the
   1800      relocations are printed interspersed with the disassembly.
   1801 
   1802 `-s'
   1803 `--full-contents'
   1804      Display the full contents of any sections requested.  By default
   1805      all non-empty sections are displayed.
   1806 
   1807 `-S'
   1808 `--source'
   1809      Display source code intermixed with disassembly, if possible.
   1810      Implies `-d'.
   1811 
   1812 `--prefix=PREFIX'
   1813      Specify PREFIX to add to the absolute paths when used with `-S'.
   1814 
   1815 `--prefix-strip=LEVEL'
   1816      Indicate how many initial directory names to strip off the
   1817      hardwired absolute paths. It has no effect without
   1818      `--prefix='PREFIX.
   1819 
   1820 `--show-raw-insn'
   1821      When disassembling instructions, print the instruction in hex as
   1822      well as in symbolic form.  This is the default except when
   1823      `--prefix-addresses' is used.
   1824 
   1825 `--no-show-raw-insn'
   1826      When disassembling instructions, do not print the instruction
   1827      bytes.  This is the default when `--prefix-addresses' is used.
   1828 
   1829 `--insn-width=WIDTH'
   1830      Display WIDTH bytes on a single line when disassembling
   1831      instructions.
   1832 
   1833 `-W[lLiaprmfFsoRt]'
   1834 `--dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges]'
   1835      Displays the contents of the debug sections in the file, if any are
   1836      present.  If one of the optional letters or words follows the
   1837      switch then only data found in those specific sections will be
   1838      dumped.
   1839 
   1840      Note that there is no single letter option to display the content
   1841      of trace sections.
   1842 
   1843 `-G'
   1844 `--stabs'
   1845      Display the full contents of any sections requested.  Display the
   1846      contents of the .stab and .stab.index and .stab.excl sections from
   1847      an ELF file.  This is only useful on systems (such as Solaris 2.0)
   1848      in which `.stab' debugging symbol-table entries are carried in an
   1849      ELF section.  In most other file formats, debugging symbol-table
   1850      entries are interleaved with linkage symbols, and are visible in
   1851      the `--syms' output.  For more information on stabs symbols, see
   1852      *note Stabs: (stabs.info)Top.
   1853 
   1854 `--start-address=ADDRESS'
   1855      Start displaying data at the specified address.  This affects the
   1856      output of the `-d', `-r' and `-s' options.
   1857 
   1858 `--stop-address=ADDRESS'
   1859      Stop displaying data at the specified address.  This affects the
   1860      output of the `-d', `-r' and `-s' options.
   1861 
   1862 `-t'
   1863 `--syms'
   1864      Print the symbol table entries of the file.  This is similar to
   1865      the information provided by the `nm' program, although the display
   1866      format is different.  The format of the output depends upon the
   1867      format of the file being dumped, but there are two main types.
   1868      One looks like this:
   1869 
   1870           [  4](sec  3)(fl 0x00)(ty   0)(scl   3) (nx 1) 0x00000000 .bss
   1871           [  6](sec  1)(fl 0x00)(ty   0)(scl   2) (nx 0) 0x00000000 fred
   1872 
   1873      where the number inside the square brackets is the number of the
   1874      entry in the symbol table, the SEC number is the section number,
   1875      the FL value are the symbol's flag bits, the TY number is the
   1876      symbol's type, the SCL number is the symbol's storage class and
   1877      the NX value is the number of auxilary entries associated with the
   1878      symbol.  The last two fields are the symbol's value and its name.
   1879 
   1880      The other common output format, usually seen with ELF based files,
   1881      looks like this:
   1882 
   1883           00000000 l    d  .bss   00000000 .bss
   1884           00000000 g       .text  00000000 fred
   1885 
   1886      Here the first number is the symbol's value (sometimes refered to
   1887      as its address).  The next field is actually a set of characters
   1888      and spaces indicating the flag bits that are set on the symbol.
   1889      These characters are described below.  Next is the section with
   1890      which the symbol is associated or _*ABS*_ if the section is
   1891      absolute (ie not connected with any section), or _*UND*_ if the
   1892      section is referenced in the file being dumped, but not defined
   1893      there.
   1894 
   1895      After the section name comes another field, a number, which for
   1896      common symbols is the alignment and for other symbol is the size.
   1897      Finally the symbol's name is displayed.
   1898 
   1899      The flag characters are divided into 7 groups as follows:
   1900     `l'
   1901     `g'
   1902     `u'
   1903     `!'
   1904           The symbol is a local (l), global (g), unique global (u),
   1905           neither global nor local (a space) or both global and local
   1906           (!).  A symbol can be neither local or global for a variety
   1907           of reasons, e.g., because it is used for debugging, but it is
   1908           probably an indication of a bug if it is ever both local and
   1909           global.  Unique global symbols are a GNU extension to the
   1910           standard set of ELF symbol bindings.  For such a symbol the
   1911           dynamic linker will make sure that in the entire process
   1912           there is just one symbol with this name and type in use.
   1913 
   1914     `w'
   1915           The symbol is weak (w) or strong (a space).
   1916 
   1917     `C'
   1918           The symbol denotes a constructor (C) or an ordinary symbol (a
   1919           space).
   1920 
   1921     `W'
   1922           The symbol is a warning (W) or a normal symbol (a space).  A
   1923           warning symbol's name is a message to be displayed if the
   1924           symbol following the warning symbol is ever referenced.
   1925 
   1926     `I'
   1927 
   1928     `i'
   1929           The symbol is an indirect reference to another symbol (I), a
   1930           function to be evaluated during reloc processing (i) or a
   1931           normal symbol (a space).
   1932 
   1933     `d'
   1934     `D'
   1935           The symbol is a debugging symbol (d) or a dynamic symbol (D)
   1936           or a normal symbol (a space).
   1937 
   1938     `F'
   1939 
   1940     `f'
   1941 
   1942     `O'
   1943           The symbol is the name of a function (F) or a file (f) or an
   1944           object (O) or just a normal symbol (a space).
   1945 
   1946 `-T'
   1947 `--dynamic-syms'
   1948      Print the dynamic symbol table entries of the file.  This is only
   1949      meaningful for dynamic objects, such as certain types of shared
   1950      libraries.  This is similar to the information provided by the `nm'
   1951      program when given the `-D' (`--dynamic') option.
   1952 
   1953 `--special-syms'
   1954      When displaying symbols include those which the target considers
   1955      to be special in some way and which would not normally be of
   1956      interest to the user.
   1957 
   1958 `-V'
   1959 `--version'
   1960      Print the version number of `objdump' and exit.
   1961 
   1962 `-x'
   1963 `--all-headers'
   1964      Display all available header information, including the symbol
   1965      table and relocation entries.  Using `-x' is equivalent to
   1966      specifying all of `-a -f -h -p -r -t'.
   1967 
   1968 `-w'
   1969 `--wide'
   1970      Format some lines for output devices that have more than 80
   1971      columns.  Also do not truncate symbol names when they are
   1972      displayed.
   1973 
   1974 `-z'
   1975 `--disassemble-zeroes'
   1976      Normally the disassembly output will skip blocks of zeroes.  This
   1977      option directs the disassembler to disassemble those blocks, just
   1978      like any other data.
   1979 
   1980 
   1981 File: binutils.info,  Node: ranlib,  Next: readelf,  Prev: objdump,  Up: Top
   1982 
   1983 5 ranlib
   1984 ********
   1985 
   1986      ranlib [`-vVt'] ARCHIVE
   1987 
   1988    `ranlib' generates an index to the contents of an archive and stores
   1989 it in the archive.  The index lists each symbol defined by a member of
   1990 an archive that is a relocatable object file.
   1991 
   1992    You may use `nm -s' or `nm --print-armap' to list this index.
   1993 
   1994    An archive with such an index speeds up linking to the library and
   1995 allows routines in the library to call each other without regard to
   1996 their placement in the archive.
   1997 
   1998    The GNU `ranlib' program is another form of GNU `ar'; running
   1999 `ranlib' is completely equivalent to executing `ar -s'.  *Note ar::.
   2000 
   2001 `-v'
   2002 `-V'
   2003 `--version'
   2004      Show the version number of `ranlib'.
   2005 
   2006 `-t'
   2007      Update the timestamp of the symbol map of an archive.
   2008 
   2009 
   2010 File: binutils.info,  Node: size,  Next: strings,  Prev: readelf,  Up: Top
   2011 
   2012 6 size
   2013 ******
   2014 
   2015      size [`-A'|`-B'|`--format='COMPATIBILITY]
   2016           [`--help']
   2017           [`-d'|`-o'|`-x'|`--radix='NUMBER]
   2018           [`--common']
   2019           [`-t'|`--totals']
   2020           [`--target='BFDNAME] [`-V'|`--version']
   2021           [OBJFILE...]
   2022 
   2023    The GNU `size' utility lists the section sizes--and the total
   2024 size--for each of the object or archive files OBJFILE in its argument
   2025 list.  By default, one line of output is generated for each object file
   2026 or each module in an archive.
   2027 
   2028    OBJFILE... are the object files to be examined.  If none are
   2029 specified, the file `a.out' will be used.
   2030 
   2031    The command line options have the following meanings:
   2032 
   2033 `-A'
   2034 `-B'
   2035 `--format=COMPATIBILITY'
   2036      Using one of these options, you can choose whether the output from
   2037      GNU `size' resembles output from System V `size' (using `-A', or
   2038      `--format=sysv'), or Berkeley `size' (using `-B', or
   2039      `--format=berkeley').  The default is the one-line format similar
   2040      to Berkeley's.
   2041 
   2042      Here is an example of the Berkeley (default) format of output from
   2043      `size':
   2044           $ size --format=Berkeley ranlib size
   2045           text    data    bss     dec     hex     filename
   2046           294880  81920   11592   388392  5ed28   ranlib
   2047           294880  81920   11888   388688  5ee50   size
   2048 
   2049      This is the same data, but displayed closer to System V
   2050      conventions:
   2051 
   2052           $ size --format=SysV ranlib size
   2053           ranlib  :
   2054           section         size         addr
   2055           .text         294880         8192
   2056           .data          81920       303104
   2057           .bss           11592       385024
   2058           Total         388392
   2059 
   2060 
   2061           size  :
   2062           section         size         addr
   2063           .text         294880         8192
   2064           .data          81920       303104
   2065           .bss           11888       385024
   2066           Total         388688
   2067 
   2068 `--help'
   2069      Show a summary of acceptable arguments and options.
   2070 
   2071 `-d'
   2072 `-o'
   2073 `-x'
   2074 `--radix=NUMBER'
   2075      Using one of these options, you can control whether the size of
   2076      each section is given in decimal (`-d', or `--radix=10'); octal
   2077      (`-o', or `--radix=8'); or hexadecimal (`-x', or `--radix=16').
   2078      In `--radix=NUMBER', only the three values (8, 10, 16) are
   2079      supported.  The total size is always given in two radices; decimal
   2080      and hexadecimal for `-d' or `-x' output, or octal and hexadecimal
   2081      if you're using `-o'.
   2082 
   2083 `--common'
   2084      Print total size of common symbols in each file.  When using
   2085      Berkeley format these are included in the bss size.
   2086 
   2087 `-t'
   2088 `--totals'
   2089      Show totals of all objects listed (Berkeley format listing mode
   2090      only).
   2091 
   2092 `--target=BFDNAME'
   2093      Specify that the object-code format for OBJFILE is BFDNAME.  This
   2094      option may not be necessary; `size' can automatically recognize
   2095      many formats.  *Note Target Selection::, for more information.
   2096 
   2097 `-V'
   2098 `--version'
   2099      Display the version number of `size'.
   2100 
   2101 
   2102 File: binutils.info,  Node: strings,  Next: strip,  Prev: size,  Up: Top
   2103 
   2104 7 strings
   2105 *********
   2106 
   2107      strings [`-afovV'] [`-'MIN-LEN]
   2108              [`-n' MIN-LEN] [`--bytes='MIN-LEN]
   2109              [`-t' RADIX] [`--radix='RADIX]
   2110              [`-e' ENCODING] [`--encoding='ENCODING]
   2111              [`-'] [`--all'] [`--print-file-name']
   2112              [`-T' BFDNAME] [`--target='BFDNAME]
   2113              [`--help'] [`--version'] FILE...
   2114 
   2115    For each FILE given, GNU `strings' prints the printable character
   2116 sequences that are at least 4 characters long (or the number given with
   2117 the options below) and are followed by an unprintable character.  By
   2118 default, it only prints the strings from the initialized and loaded
   2119 sections of object files; for other types of files, it prints the
   2120 strings from the whole file.
   2121 
   2122    `strings' is mainly useful for determining the contents of non-text
   2123 files.
   2124 
   2125 `-a'
   2126 `--all'
   2127 `-'
   2128      Do not scan only the initialized and loaded sections of object
   2129      files; scan the whole files.
   2130 
   2131 `-f'
   2132 `--print-file-name'
   2133      Print the name of the file before each string.
   2134 
   2135 `--help'
   2136      Print a summary of the program usage on the standard output and
   2137      exit.
   2138 
   2139 `-MIN-LEN'
   2140 `-n MIN-LEN'
   2141 `--bytes=MIN-LEN'
   2142      Print sequences of characters that are at least MIN-LEN characters
   2143      long, instead of the default 4.
   2144 
   2145 `-o'
   2146      Like `-t o'.  Some other versions of `strings' have `-o' act like
   2147      `-t d' instead.  Since we can not be compatible with both ways, we
   2148      simply chose one.
   2149 
   2150 `-t RADIX'
   2151 `--radix=RADIX'
   2152      Print the offset within the file before each string.  The single
   2153      character argument specifies the radix of the offset--`o' for
   2154      octal, `x' for hexadecimal, or `d' for decimal.
   2155 
   2156 `-e ENCODING'
   2157 `--encoding=ENCODING'
   2158      Select the character encoding of the strings that are to be found.
   2159      Possible values for ENCODING are: `s' = single-7-bit-byte
   2160      characters (ASCII, ISO 8859, etc., default), `S' =
   2161      single-8-bit-byte characters, `b' = 16-bit bigendian, `l' = 16-bit
   2162      littleendian, `B' = 32-bit bigendian, `L' = 32-bit littleendian.
   2163      Useful for finding wide character strings. (`l' and `b' apply to,
   2164      for example, Unicode UTF-16/UCS-2 encodings).
   2165 
   2166 `-T BFDNAME'
   2167 `--target=BFDNAME'
   2168      Specify an object code format other than your system's default
   2169      format.  *Note Target Selection::, for more information.
   2170 
   2171 `-v'
   2172 `-V'
   2173 `--version'
   2174      Print the program version number on the standard output and exit.
   2175 
   2176 
   2177 File: binutils.info,  Node: strip,  Next: elfedit,  Prev: strings,  Up: Top
   2178 
   2179 8 strip
   2180 *******
   2181 
   2182      strip [`-F' BFDNAME |`--target='BFDNAME]
   2183            [`-I' BFDNAME |`--input-target='BFDNAME]
   2184            [`-O' BFDNAME |`--output-target='BFDNAME]
   2185            [`-s'|`--strip-all']
   2186            [`-S'|`-g'|`-d'|`--strip-debug']
   2187            [`-K' SYMBOLNAME |`--keep-symbol='SYMBOLNAME]
   2188            [`-N' SYMBOLNAME |`--strip-symbol='SYMBOLNAME]
   2189            [`-w'|`--wildcard']
   2190            [`-x'|`--discard-all'] [`-X' |`--discard-locals']
   2191            [`-R' SECTIONNAME |`--remove-section='SECTIONNAME]
   2192            [`-o' FILE] [`-p'|`--preserve-dates']
   2193            [`--keep-file-symbols']
   2194            [`--only-keep-debug']
   2195            [`-v' |`--verbose'] [`-V'|`--version']
   2196            [`--help'] [`--info']
   2197            OBJFILE...
   2198 
   2199    GNU `strip' discards all symbols from object files OBJFILE.  The
   2200 list of object files may include archives.  At least one object file
   2201 must be given.
   2202 
   2203    `strip' modifies the files named in its argument, rather than
   2204 writing modified copies under different names.
   2205 
   2206 `-F BFDNAME'
   2207 `--target=BFDNAME'
   2208      Treat the original OBJFILE as a file with the object code format
   2209      BFDNAME, and rewrite it in the same format.  *Note Target
   2210      Selection::, for more information.
   2211 
   2212 `--help'
   2213      Show a summary of the options to `strip' and exit.
   2214 
   2215 `--info'
   2216      Display a list showing all architectures and object formats
   2217      available.
   2218 
   2219 `-I BFDNAME'
   2220 `--input-target=BFDNAME'
   2221      Treat the original OBJFILE as a file with the object code format
   2222      BFDNAME.  *Note Target Selection::, for more information.
   2223 
   2224 `-O BFDNAME'
   2225 `--output-target=BFDNAME'
   2226      Replace OBJFILE with a file in the output format BFDNAME.  *Note
   2227      Target Selection::, for more information.
   2228 
   2229 `-R SECTIONNAME'
   2230 `--remove-section=SECTIONNAME'
   2231      Remove any section named SECTIONNAME from the output file.  This
   2232      option may be given more than once.  Note that using this option
   2233      inappropriately may make the output file unusable.
   2234 
   2235 `-s'
   2236 `--strip-all'
   2237      Remove all symbols.
   2238 
   2239 `-g'
   2240 `-S'
   2241 `-d'
   2242 `--strip-debug'
   2243      Remove debugging symbols only.
   2244 
   2245 `--strip-unneeded'
   2246      Remove all symbols that are not needed for relocation processing.
   2247 
   2248 `-K SYMBOLNAME'
   2249 `--keep-symbol=SYMBOLNAME'
   2250      When stripping symbols, keep symbol SYMBOLNAME even if it would
   2251      normally be stripped.  This option may be given more than once.
   2252 
   2253 `-N SYMBOLNAME'
   2254 `--strip-symbol=SYMBOLNAME'
   2255      Remove symbol SYMBOLNAME from the source file. This option may be
   2256      given more than once, and may be combined with strip options other
   2257      than `-K'.
   2258 
   2259 `-o FILE'
   2260      Put the stripped output in FILE, rather than replacing the
   2261      existing file.  When this argument is used, only one OBJFILE
   2262      argument may be specified.
   2263 
   2264 `-p'
   2265 `--preserve-dates'
   2266      Preserve the access and modification dates of the file.
   2267 
   2268 `-w'
   2269 `--wildcard'
   2270      Permit regular expressions in SYMBOLNAMEs used in other command
   2271      line options.  The question mark (?), asterisk (*), backslash (\)
   2272      and square brackets ([]) operators can be used anywhere in the
   2273      symbol name.  If the first character of the symbol name is the
   2274      exclamation point (!) then the sense of the switch is reversed for
   2275      that symbol.  For example:
   2276 
   2277             -w -K !foo -K fo*
   2278 
   2279      would cause strip to only keep symbols that start with the letters
   2280      "fo", but to discard the symbol "foo".
   2281 
   2282 `-x'
   2283 `--discard-all'
   2284      Remove non-global symbols.
   2285 
   2286 `-X'
   2287 `--discard-locals'
   2288      Remove compiler-generated local symbols.  (These usually start
   2289      with `L' or `.'.)
   2290 
   2291 `--keep-file-symbols'
   2292      When stripping a file, perhaps with `--strip-debug' or
   2293      `--strip-unneeded', retain any symbols specifying source file
   2294      names, which would otherwise get stripped.
   2295 
   2296 `--only-keep-debug'
   2297      Strip a file, removing contents of any sections that would not be
   2298      stripped by `--strip-debug' and leaving the debugging sections
   2299      intact.  In ELF files, this preserves all note sections in the
   2300      output.
   2301 
   2302      The intention is that this option will be used in conjunction with
   2303      `--add-gnu-debuglink' to create a two part executable.  One a
   2304      stripped binary which will occupy less space in RAM and in a
   2305      distribution and the second a debugging information file which is
   2306      only needed if debugging abilities are required.  The suggested
   2307      procedure to create these files is as follows:
   2308 
   2309        1. Link the executable as normal.  Assuming that is is called
   2310           `foo' then...
   2311 
   2312        2. Run `objcopy --only-keep-debug foo foo.dbg' to create a file
   2313           containing the debugging info.
   2314 
   2315        3. Run `objcopy --strip-debug foo' to create a stripped
   2316           executable.
   2317 
   2318        4. Run `objcopy --add-gnu-debuglink=foo.dbg foo' to add a link
   2319           to the debugging info into the stripped executable.
   2320 
   2321      Note--the choice of `.dbg' as an extension for the debug info file
   2322      is arbitrary.  Also the `--only-keep-debug' step is optional.  You
   2323      could instead do this:
   2324 
   2325        1. Link the executable as normal.
   2326 
   2327        2. Copy `foo' to `foo.full'
   2328 
   2329        3. Run `strip --strip-debug foo'
   2330 
   2331        4. Run `objcopy --add-gnu-debuglink=foo.full foo'
   2332 
   2333      i.e., the file pointed to by the `--add-gnu-debuglink' can be the
   2334      full executable.  It does not have to be a file created by the
   2335      `--only-keep-debug' switch.
   2336 
   2337      Note--this switch is only intended for use on fully linked files.
   2338      It does not make sense to use it on object files where the
   2339      debugging information may be incomplete.  Besides the
   2340      gnu_debuglink feature currently only supports the presence of one
   2341      filename containing debugging information, not multiple filenames
   2342      on a one-per-object-file basis.
   2343 
   2344 `-V'
   2345 `--version'
   2346      Show the version number for `strip'.
   2347 
   2348 `-v'
   2349 `--verbose'
   2350      Verbose output: list all object files modified.  In the case of
   2351      archives, `strip -v' lists all members of the archive.
   2352 
   2353 
   2354 File: binutils.info,  Node: c++filt,  Next: addr2line,  Prev: elfedit,  Up: Top
   2355 
   2356 9 c++filt
   2357 *********
   2358 
   2359      c++filt [`-_'|`--strip-underscores']
   2360              [`-n'|`--no-strip-underscores']
   2361              [`-p'|`--no-params']
   2362              [`-t'|`--types']
   2363              [`-i'|`--no-verbose']
   2364              [`-s' FORMAT|`--format='FORMAT]
   2365              [`--help']  [`--version']  [SYMBOL...]
   2366 
   2367    The C++ and Java languages provide function overloading, which means
   2368 that you can write many functions with the same name, providing that
   2369 each function takes parameters of different types.  In order to be able
   2370 to distinguish these similarly named functions C++ and Java encode them
   2371 into a low-level assembler name which uniquely identifies each
   2372 different version.  This process is known as "mangling". The `c++filt'
   2373 (1) program does the inverse mapping: it decodes ("demangles") low-level
   2374 names into user-level names so that they can be read.
   2375 
   2376    Every alphanumeric word (consisting of letters, digits, underscores,
   2377 dollars, or periods) seen in the input is a potential mangled name.  If
   2378 the name decodes into a C++ name, the C++ name replaces the low-level
   2379 name in the output, otherwise the original word is output.  In this way
   2380 you can pass an entire assembler source file, containing mangled names,
   2381 through `c++filt' and see the same source file containing demangled
   2382 names.
   2383 
   2384    You can also use `c++filt' to decipher individual symbols by passing
   2385 them on the command line:
   2386 
   2387      c++filt SYMBOL
   2388 
   2389    If no SYMBOL arguments are given, `c++filt' reads symbol names from
   2390 the standard input instead.  All the results are printed on the
   2391 standard output.  The difference between reading names from the command
   2392 line versus reading names from the standard input is that command line
   2393 arguments are expected to be just mangled names and no checking is
   2394 performed to separate them from surrounding text.  Thus for example:
   2395 
   2396      c++filt -n _Z1fv
   2397 
   2398    will work and demangle the name to "f()" whereas:
   2399 
   2400      c++filt -n _Z1fv,
   2401 
   2402    will not work.  (Note the extra comma at the end of the mangled name
   2403 which makes it invalid).  This command however will work:
   2404 
   2405      echo _Z1fv, | c++filt -n
   2406 
   2407    and will display "f(),", i.e., the demangled name followed by a
   2408 trailing comma.  This behaviour is because when the names are read from
   2409 the standard input it is expected that they might be part of an
   2410 assembler source file where there might be extra, extraneous characters
   2411 trailing after a mangled name.  For example:
   2412 
   2413          .type   _Z1fv, @function
   2414 
   2415 `-_'
   2416 `--strip-underscores'
   2417      On some systems, both the C and C++ compilers put an underscore in
   2418      front of every name.  For example, the C name `foo' gets the
   2419      low-level name `_foo'.  This option removes the initial
   2420      underscore.  Whether `c++filt' removes the underscore by default
   2421      is target dependent.
   2422 
   2423 `-n'
   2424 `--no-strip-underscores'
   2425      Do not remove the initial underscore.
   2426 
   2427 `-p'
   2428 `--no-params'
   2429      When demangling the name of a function, do not display the types of
   2430      the function's parameters.
   2431 
   2432 `-t'
   2433 `--types'
   2434      Attempt to demangle types as well as function names.  This is
   2435      disabled by default since mangled types are normally only used
   2436      internally in the compiler, and they can be confused with
   2437      non-mangled names.  For example, a function called "a" treated as
   2438      a mangled type name would be demangled to "signed char".
   2439 
   2440 `-i'
   2441 `--no-verbose'
   2442      Do not include implementation details (if any) in the demangled
   2443      output.
   2444 
   2445 `-s FORMAT'
   2446 `--format=FORMAT'
   2447      `c++filt' can decode various methods of mangling, used by
   2448      different compilers.  The argument to this option selects which
   2449      method it uses:
   2450 
   2451     `auto'
   2452           Automatic selection based on executable (the default method)
   2453 
   2454     `gnu'
   2455           the one used by the GNU C++ compiler (g++)
   2456 
   2457     `lucid'
   2458           the one used by the Lucid compiler (lcc)
   2459 
   2460     `arm'
   2461           the one specified by the C++ Annotated Reference Manual
   2462 
   2463     `hp'
   2464           the one used by the HP compiler (aCC)
   2465 
   2466     `edg'
   2467           the one used by the EDG compiler
   2468 
   2469     `gnu-v3'
   2470           the one used by the GNU C++ compiler (g++) with the V3 ABI.
   2471 
   2472     `java'
   2473           the one used by the GNU Java compiler (gcj)
   2474 
   2475     `gnat'
   2476           the one used by the GNU Ada compiler (GNAT).
   2477 
   2478 `--help'
   2479      Print a summary of the options to `c++filt' and exit.
   2480 
   2481 `--version'
   2482      Print the version number of `c++filt' and exit.
   2483 
   2484      _Warning:_ `c++filt' is a new utility, and the details of its user
   2485      interface are subject to change in future releases.  In particular,
   2486      a command-line option may be required in the future to decode a
   2487      name passed as an argument on the command line; in other words,
   2488 
   2489           c++filt SYMBOL
   2490 
   2491      may in a future release become
   2492 
   2493           c++filt OPTION SYMBOL
   2494 
   2495    ---------- Footnotes ----------
   2496 
   2497    (1) MS-DOS does not allow `+' characters in file names, so on MS-DOS
   2498 this program is named `CXXFILT'.
   2499 
   2500 
   2501 File: binutils.info,  Node: addr2line,  Next: nlmconv,  Prev: c++filt,  Up: Top
   2502 
   2503 10 addr2line
   2504 ************
   2505 
   2506      addr2line [`-a'|`--addresses']
   2507                [`-b' BFDNAME|`--target='BFDNAME]
   2508                [`-C'|`--demangle'[=STYLE]]
   2509                [`-e' FILENAME|`--exe='FILENAME]
   2510                [`-f'|`--functions'] [`-s'|`--basename']
   2511                [`-i'|`--inlines']
   2512                [`-p'|`--pretty-print']
   2513                [`-j'|`--section='NAME]
   2514                [`-H'|`--help'] [`-V'|`--version']
   2515                [addr addr ...]
   2516 
   2517    `addr2line' translates addresses into file names and line numbers.
   2518 Given an address in an executable or an offset in a section of a
   2519 relocatable object, it uses the debugging information to figure out
   2520 which file name and line number are associated with it.
   2521 
   2522    The executable or relocatable object to use is specified with the
   2523 `-e' option.  The default is the file `a.out'.  The section in the
   2524 relocatable object to use is specified with the `-j' option.
   2525 
   2526    `addr2line' has two modes of operation.
   2527 
   2528    In the first, hexadecimal addresses are specified on the command
   2529 line, and `addr2line' displays the file name and line number for each
   2530 address.
   2531 
   2532    In the second, `addr2line' reads hexadecimal addresses from standard
   2533 input, and prints the file name and line number for each address on
   2534 standard output.  In this mode, `addr2line' may be used in a pipe to
   2535 convert dynamically chosen addresses.
   2536 
   2537    The format of the output is `FILENAME:LINENO'.  The file name and
   2538 line number for each address is printed on a separate line.  If the
   2539 `-f' option is used, then each `FILENAME:LINENO' line is preceded by a
   2540 `FUNCTIONNAME' line which is the name of the function containing the
   2541 address.  If the `-a' option is used, then the address read is first
   2542 printed.
   2543 
   2544    If the file name or function name can not be determined, `addr2line'
   2545 will print two question marks in their place.  If the line number can
   2546 not be determined, `addr2line' will print 0.
   2547 
   2548    The long and short forms of options, shown here as alternatives, are
   2549 equivalent.
   2550 
   2551 `-a'
   2552 `--addresses'
   2553      Display address before function names or file and line number
   2554      information.  The address is printed with a `0x' prefix to easily
   2555      identify it.
   2556 
   2557 `-b BFDNAME'
   2558 `--target=BFDNAME'
   2559      Specify that the object-code format for the object files is
   2560      BFDNAME.
   2561 
   2562 `-C'
   2563 `--demangle[=STYLE]'
   2564      Decode ("demangle") low-level symbol names into user-level names.
   2565      Besides removing any initial underscore prepended by the system,
   2566      this makes C++ function names readable.  Different compilers have
   2567      different mangling styles. The optional demangling style argument
   2568      can be used to choose an appropriate demangling style for your
   2569      compiler. *Note c++filt::, for more information on demangling.
   2570 
   2571 `-e FILENAME'
   2572 `--exe=FILENAME'
   2573      Specify the name of the executable for which addresses should be
   2574      translated.  The default file is `a.out'.
   2575 
   2576 `-f'
   2577 `--functions'
   2578      Display function names as well as file and line number information.
   2579 
   2580 `-s'
   2581 `--basenames'
   2582      Display only the base of each file name.
   2583 
   2584 `-i'
   2585 `--inlines'
   2586      If the address belongs to a function that was inlined, the source
   2587      information for all enclosing scopes back to the first non-inlined
   2588      function will also be printed.  For example, if `main' inlines
   2589      `callee1' which inlines `callee2', and address is from `callee2',
   2590      the source information for `callee1' and `main' will also be
   2591      printed.
   2592 
   2593 `-j'
   2594 `--section'
   2595      Read offsets relative to the specified section instead of absolute
   2596      addresses.
   2597 
   2598 `-p'
   2599 `--pretty-print'
   2600      Make the output more human friendly: each location are printed on
   2601      one line.  If option `-i' is specified, lines for all enclosing
   2602      scopes are prefixed with `(inlined by)'.
   2603 
   2604 
   2605 File: binutils.info,  Node: nlmconv,  Next: windres,  Prev: addr2line,  Up: Top
   2606 
   2607 11 nlmconv
   2608 **********
   2609 
   2610 `nlmconv' converts a relocatable object file into a NetWare Loadable
   2611 Module.
   2612 
   2613      _Warning:_ `nlmconv' is not always built as part of the binary
   2614      utilities, since it is only useful for NLM targets.
   2615 
   2616      nlmconv [`-I' BFDNAME|`--input-target='BFDNAME]
   2617              [`-O' BFDNAME|`--output-target='BFDNAME]
   2618              [`-T' HEADERFILE|`--header-file='HEADERFILE]
   2619              [`-d'|`--debug'] [`-l' LINKER|`--linker='LINKER]
   2620              [`-h'|`--help'] [`-V'|`--version']
   2621              INFILE OUTFILE
   2622 
   2623    `nlmconv' converts the relocatable `i386' object file INFILE into
   2624 the NetWare Loadable Module OUTFILE, optionally reading HEADERFILE for
   2625 NLM header information.  For instructions on writing the NLM command
   2626 file language used in header files, see the `linkers' section,
   2627 `NLMLINK' in particular, of the `NLM Development and Tools Overview',
   2628 which is part of the NLM Software Developer's Kit ("NLM SDK"),
   2629 available from Novell, Inc.  `nlmconv' uses the GNU Binary File
   2630 Descriptor library to read INFILE; see *note BFD: (ld.info)BFD, for
   2631 more information.
   2632 
   2633    `nlmconv' can perform a link step.  In other words, you can list
   2634 more than one object file for input if you list them in the definitions
   2635 file (rather than simply specifying one input file on the command line).
   2636 In this case, `nlmconv' calls the linker for you.
   2637 
   2638 `-I BFDNAME'
   2639 `--input-target=BFDNAME'
   2640      Object format of the input file.  `nlmconv' can usually determine
   2641      the format of a given file (so no default is necessary).  *Note
   2642      Target Selection::, for more information.
   2643 
   2644 `-O BFDNAME'
   2645 `--output-target=BFDNAME'
   2646      Object format of the output file.  `nlmconv' infers the output
   2647      format based on the input format, e.g. for a `i386' input file the
   2648      output format is `nlm32-i386'.  *Note Target Selection::, for more
   2649      information.
   2650 
   2651 `-T HEADERFILE'
   2652 `--header-file=HEADERFILE'
   2653      Reads HEADERFILE for NLM header information.  For instructions on
   2654      writing the NLM command file language used in header files, see
   2655      see the `linkers' section, of the `NLM Development and Tools
   2656      Overview', which is part of the NLM Software Developer's Kit,
   2657      available from Novell, Inc.
   2658 
   2659 `-d'
   2660 `--debug'
   2661      Displays (on standard error) the linker command line used by
   2662      `nlmconv'.
   2663 
   2664 `-l LINKER'
   2665 `--linker=LINKER'
   2666      Use LINKER for any linking.  LINKER can be an absolute or a
   2667      relative pathname.
   2668 
   2669 `-h'
   2670 `--help'
   2671      Prints a usage summary.
   2672 
   2673 `-V'
   2674 `--version'
   2675      Prints the version number for `nlmconv'.
   2676 
   2677 
   2678 File: binutils.info,  Node: windmc,  Next: dlltool,  Prev: windres,  Up: Top
   2679 
   2680 12 windmc
   2681 *********
   2682 
   2683 `windmc' may be used to generator Windows message resources.
   2684 
   2685      _Warning:_ `windmc' is not always built as part of the binary
   2686      utilities, since it is only useful for Windows targets.
   2687 
   2688      windmc [options] input-file
   2689 
   2690    `windmc' reads message definitions from an input file (.mc) and
   2691 translate them into a set of output files.  The output files may be of
   2692 four kinds:
   2693 
   2694 `h'
   2695      A C header file containing the message definitions.
   2696 
   2697 `rc'
   2698      A resource file compilable by the `windres' tool.
   2699 
   2700 `bin'
   2701      One or more binary files containing the resource data for a
   2702      specific message language.
   2703 
   2704 `dbg'
   2705      A C include file that maps message id's to their symbolic name.
   2706 
   2707    The exact description of these different formats is available in
   2708 documentation from Microsoft.
   2709 
   2710    When `windmc' converts from the `mc' format to the `bin' format,
   2711 `rc', `h', and optional `dbg' it is acting like the Windows Message
   2712 Compiler.
   2713 
   2714 `-a'
   2715 `--ascii_in'
   2716      Specifies that the input file specified is ASCII. This is the
   2717      default behaviour.
   2718 
   2719 `-A'
   2720 `--ascii_out'
   2721      Specifies that messages in the output `bin' files should be in
   2722      ASCII format.
   2723 
   2724 `-b'
   2725 `--binprefix'
   2726      Specifies that `bin' filenames should have to be prefixed by the
   2727      basename of the source file.
   2728 
   2729 `-c'
   2730 `--customflag'
   2731      Sets the customer bit in all message id's.
   2732 
   2733 `-C CODEPAGE'
   2734 `--codepage_in CODEPAGE'
   2735      Sets the default codepage to be used to convert input file to
   2736      UTF16. The default is ocdepage 1252.
   2737 
   2738 `-d'
   2739 `--decimal_values'
   2740      Outputs the constants in the header file in decimal. Default is
   2741      using hexadecimal output.
   2742 
   2743 `-e EXT'
   2744 `--extension EXT'
   2745      The extension for the header file. The default is .h extension.
   2746 
   2747 `-F TARGET'
   2748 `--target TARGET'
   2749      Specify the BFD format to use for a bin file as output.  This is a
   2750      BFD target name; you can use the `--help' option to see a list of
   2751      supported targets.  Normally `windmc' will use the default format,
   2752      which is the first one listed by the `--help' option.  *note
   2753      Target Selection::.
   2754 
   2755 `-h PATH'
   2756 `--headerdir PATH'
   2757      The target directory of the generated header file. The default is
   2758      the current directory.
   2759 
   2760 `-H'
   2761 `--help'
   2762      Displays a list of command line options and then exits.
   2763 
   2764 `-m CHARACTERS'
   2765 `--maxlength CHARACTERS'
   2766      Instructs `windmc' to generate a warning if the length of any
   2767      message exceeds the number specified.
   2768 
   2769 `-n'
   2770 `--nullterminate'
   2771      Terminate message text in `bin' files by zero. By default they are
   2772      terminated by CR/LF.
   2773 
   2774 `-o'
   2775 `--hresult_use'
   2776      Not yet implemented. Instructs `windmc' to generate an OLE2 header
   2777      file, using HRESULT definitions. Status codes are used if the flag
   2778      is not specified.
   2779 
   2780 `-O CODEPAGE'
   2781 `--codepage_out CODEPAGE'
   2782      Sets the default codepage to be used to output text files. The
   2783      default is ocdepage 1252.
   2784 
   2785 `-r PATH'
   2786 `--rcdir PATH'
   2787      The target directory for the generated `rc' script and the
   2788      generated `bin' files that the resource compiler script includes.
   2789      The default is the current directory.
   2790 
   2791 `-u'
   2792 `--unicode_in'
   2793      Specifies that the input file is UTF16.
   2794 
   2795 `-U'
   2796 `--unicode_out'
   2797      Specifies that messages in the output `bin' file should be in UTF16
   2798      format. This is the default behaviour.
   2799 
   2800 `-v'
   2801 
   2802 `--verbose'
   2803      Enable verbose mode.
   2804 
   2805 `-V'
   2806 
   2807 `--version'
   2808      Prints the version number for `windmc'.
   2809 
   2810 `-x PATH'
   2811 `--xdgb PATH'
   2812      The path of the `dbg' C include file that maps message id's to the
   2813      symbolic name. No such file is generated without specifying the
   2814      switch.
   2815 
   2816 
   2817 File: binutils.info,  Node: windres,  Next: windmc,  Prev: nlmconv,  Up: Top
   2818 
   2819 13 windres
   2820 **********
   2821 
   2822 `windres' may be used to manipulate Windows resources.
   2823 
   2824      _Warning:_ `windres' is not always built as part of the binary
   2825      utilities, since it is only useful for Windows targets.
   2826 
   2827      windres [options] [input-file] [output-file]
   2828 
   2829    `windres' reads resources from an input file and copies them into an
   2830 output file.  Either file may be in one of three formats:
   2831 
   2832 `rc'
   2833      A text format read by the Resource Compiler.
   2834 
   2835 `res'
   2836      A binary format generated by the Resource Compiler.
   2837 
   2838 `coff'
   2839      A COFF object or executable.
   2840 
   2841    The exact description of these different formats is available in
   2842 documentation from Microsoft.
   2843 
   2844    When `windres' converts from the `rc' format to the `res' format, it
   2845 is acting like the Windows Resource Compiler.  When `windres' converts
   2846 from the `res' format to the `coff' format, it is acting like the
   2847 Windows `CVTRES' program.
   2848 
   2849    When `windres' generates an `rc' file, the output is similar but not
   2850 identical to the format expected for the input.  When an input `rc'
   2851 file refers to an external filename, an output `rc' file will instead
   2852 include the file contents.
   2853 
   2854    If the input or output format is not specified, `windres' will guess
   2855 based on the file name, or, for the input file, the file contents.  A
   2856 file with an extension of `.rc' will be treated as an `rc' file, a file
   2857 with an extension of `.res' will be treated as a `res' file, and a file
   2858 with an extension of `.o' or `.exe' will be treated as a `coff' file.
   2859 
   2860    If no output file is specified, `windres' will print the resources
   2861 in `rc' format to standard output.
   2862 
   2863    The normal use is for you to write an `rc' file, use `windres' to
   2864 convert it to a COFF object file, and then link the COFF file into your
   2865 application.  This will make the resources described in the `rc' file
   2866 available to Windows.
   2867 
   2868 `-i FILENAME'
   2869 `--input FILENAME'
   2870      The name of the input file.  If this option is not used, then
   2871      `windres' will use the first non-option argument as the input file
   2872      name.  If there are no non-option arguments, then `windres' will
   2873      read from standard input.  `windres' can not read a COFF file from
   2874      standard input.
   2875 
   2876 `-o FILENAME'
   2877 `--output FILENAME'
   2878      The name of the output file.  If this option is not used, then
   2879      `windres' will use the first non-option argument, after any used
   2880      for the input file name, as the output file name.  If there is no
   2881      non-option argument, then `windres' will write to standard output.
   2882      `windres' can not write a COFF file to standard output.  Note, for
   2883      compatibility with `rc' the option `-fo' is also accepted, but its
   2884      use is not recommended.
   2885 
   2886 `-J FORMAT'
   2887 `--input-format FORMAT'
   2888      The input format to read.  FORMAT may be `res', `rc', or `coff'.
   2889      If no input format is specified, `windres' will guess, as
   2890      described above.
   2891 
   2892 `-O FORMAT'
   2893 `--output-format FORMAT'
   2894      The output format to generate.  FORMAT may be `res', `rc', or
   2895      `coff'.  If no output format is specified, `windres' will guess,
   2896      as described above.
   2897 
   2898 `-F TARGET'
   2899 `--target TARGET'
   2900      Specify the BFD format to use for a COFF file as input or output.
   2901      This is a BFD target name; you can use the `--help' option to see
   2902      a list of supported targets.  Normally `windres' will use the
   2903      default format, which is the first one listed by the `--help'
   2904      option.  *note Target Selection::.
   2905 
   2906 `--preprocessor PROGRAM'
   2907      When `windres' reads an `rc' file, it runs it through the C
   2908      preprocessor first.  This option may be used to specify the
   2909      preprocessor to use, including any leading arguments.  The default
   2910      preprocessor argument is `gcc -E -xc-header -DRC_INVOKED'.
   2911 
   2912 `-I DIRECTORY'
   2913 `--include-dir DIRECTORY'
   2914      Specify an include directory to use when reading an `rc' file.
   2915      `windres' will pass this to the preprocessor as an `-I' option.
   2916      `windres' will also search this directory when looking for files
   2917      named in the `rc' file.  If the argument passed to this command
   2918      matches any of the supported FORMATS (as described in the `-J'
   2919      option), it will issue a deprecation warning, and behave just like
   2920      the `-J' option.  New programs should not use this behaviour.  If a
   2921      directory happens to match a FORMAT, simple prefix it with `./' to
   2922      disable the backward compatibility.
   2923 
   2924 `-D TARGET'
   2925 `--define SYM[=VAL]'
   2926      Specify a `-D' option to pass to the preprocessor when reading an
   2927      `rc' file.
   2928 
   2929 `-U TARGET'
   2930 `--undefine SYM'
   2931      Specify a `-U' option to pass to the preprocessor when reading an
   2932      `rc' file.
   2933 
   2934 `-r'
   2935      Ignored for compatibility with rc.
   2936 
   2937 `-v'
   2938      Enable verbose mode.  This tells you what the preprocessor is if
   2939      you didn't specify one.
   2940 
   2941 `-c VAL'
   2942 
   2943 `--codepage VAL'
   2944      Specify the default codepage to use when reading an `rc' file.
   2945      VAL should be a hexadecimal prefixed by `0x' or decimal codepage
   2946      code. The valid range is from zero up to 0xffff, but the validity
   2947      of the codepage is host and configuration dependent.
   2948 
   2949 `-l VAL'
   2950 
   2951 `--language VAL'
   2952      Specify the default language to use when reading an `rc' file.
   2953      VAL should be a hexadecimal language code.  The low eight bits are
   2954      the language, and the high eight bits are the sublanguage.
   2955 
   2956 `--use-temp-file'
   2957      Use a temporary file to instead of using popen to read the output
   2958      of the preprocessor. Use this option if the popen implementation
   2959      is buggy on the host (eg., certain non-English language versions
   2960      of Windows 95 and Windows 98 are known to have buggy popen where
   2961      the output will instead go the console).
   2962 
   2963 `--no-use-temp-file'
   2964      Use popen, not a temporary file, to read the output of the
   2965      preprocessor.  This is the default behaviour.
   2966 
   2967 `-h'
   2968 
   2969 `--help'
   2970      Prints a usage summary.
   2971 
   2972 `-V'
   2973 
   2974 `--version'
   2975      Prints the version number for `windres'.
   2976 
   2977 `--yydebug'
   2978      If `windres' is compiled with `YYDEBUG' defined as `1', this will
   2979      turn on parser debugging.
   2980 
   2981 
   2982 File: binutils.info,  Node: dlltool,  Next: Common Options,  Prev: windmc,  Up: Top
   2983 
   2984 14 dlltool
   2985 **********
   2986 
   2987 `dlltool' is used to create the files needed to create dynamic link
   2988 libraries (DLLs) on systems which understand PE format image files such
   2989 as Windows.  A DLL contains an export table which contains information
   2990 that the runtime loader needs to resolve references from a referencing
   2991 program.
   2992 
   2993    The export table is generated by this program by reading in a `.def'
   2994 file or scanning the `.a' and `.o' files which will be in the DLL.  A
   2995 `.o' file can contain information in special `.drectve' sections with
   2996 export information.
   2997 
   2998      _Note:_ `dlltool' is not always built as part of the binary
   2999      utilities, since it is only useful for those targets which support
   3000      DLLs.
   3001 
   3002      dlltool [`-d'|`--input-def' DEF-FILE-NAME]
   3003              [`-b'|`--base-file' BASE-FILE-NAME]
   3004              [`-e'|`--output-exp' EXPORTS-FILE-NAME]
   3005              [`-z'|`--output-def' DEF-FILE-NAME]
   3006              [`-l'|`--output-lib' LIBRARY-FILE-NAME]
   3007              [`-y'|`--output-delaylib' LIBRARY-FILE-NAME]
   3008              [`--export-all-symbols'] [`--no-export-all-symbols']
   3009              [`--exclude-symbols' LIST]
   3010              [`--no-default-excludes']
   3011              [`-S'|`--as' PATH-TO-ASSEMBLER] [`-f'|`--as-flags' OPTIONS]
   3012              [`-D'|`--dllname' NAME] [`-m'|`--machine' MACHINE]
   3013              [`-a'|`--add-indirect']
   3014              [`-U'|`--add-underscore'] [`--add-stdcall-underscore']
   3015              [`-k'|`--kill-at'] [`-A'|`--add-stdcall-alias']
   3016              [`-p'|`--ext-prefix-alias' PREFIX]
   3017              [`-x'|`--no-idata4'] [`-c'|`--no-idata5']
   3018              [`--use-nul-prefixed-import-tables']
   3019              [`-I'|`--identify' LIBRARY-FILE-NAME] [`--identify-strict']
   3020              [`-i'|`--interwork']
   3021              [`-n'|`--nodelete'] [`-t'|`--temp-prefix' PREFIX]
   3022              [`-v'|`--verbose']
   3023              [`-h'|`--help'] [`-V'|`--version']
   3024              [`--no-leading-underscore'] [`--leading-underscore']
   3025              [object-file ...]
   3026 
   3027    `dlltool' reads its inputs, which can come from the `-d' and `-b'
   3028 options as well as object files specified on the command line.  It then
   3029 processes these inputs and if the `-e' option has been specified it
   3030 creates a exports file.  If the `-l' option has been specified it
   3031 creates a library file and if the `-z' option has been specified it
   3032 creates a def file.  Any or all of the `-e', `-l' and `-z' options can
   3033 be present in one invocation of dlltool.
   3034 
   3035    When creating a DLL, along with the source for the DLL, it is
   3036 necessary to have three other files.  `dlltool' can help with the
   3037 creation of these files.
   3038 
   3039    The first file is a `.def' file which specifies which functions are
   3040 exported from the DLL, which functions the DLL imports, and so on.  This
   3041 is a text file and can be created by hand, or `dlltool' can be used to
   3042 create it using the `-z' option.  In this case `dlltool' will scan the
   3043 object files specified on its command line looking for those functions
   3044 which have been specially marked as being exported and put entries for
   3045 them in the `.def' file it creates.
   3046 
   3047    In order to mark a function as being exported from a DLL, it needs to
   3048 have an `-export:<name_of_function>' entry in the `.drectve' section of
   3049 the object file.  This can be done in C by using the asm() operator:
   3050 
   3051        asm (".section .drectve");
   3052        asm (".ascii \"-export:my_func\"");
   3053 
   3054        int my_func (void) { ... }
   3055 
   3056    The second file needed for DLL creation is an exports file.  This
   3057 file is linked with the object files that make up the body of the DLL
   3058 and it handles the interface between the DLL and the outside world.
   3059 This is a binary file and it can be created by giving the `-e' option to
   3060 `dlltool' when it is creating or reading in a `.def' file.
   3061 
   3062    The third file needed for DLL creation is the library file that
   3063 programs will link with in order to access the functions in the DLL (an
   3064 `import library').  This file can be created by giving the `-l' option
   3065 to dlltool when it is creating or reading in a `.def' file.
   3066 
   3067    If the `-y' option is specified, dlltool generates a delay-import
   3068 library that can be used instead of the normal import library to allow
   3069 a program to link to the dll only as soon as an imported function is
   3070 called for the first time. The resulting executable will need to be
   3071 linked to the static delayimp library containing __delayLoadHelper2(),
   3072 which in turn will import LoadLibraryA and GetProcAddress from kernel32.
   3073 
   3074    `dlltool' builds the library file by hand, but it builds the exports
   3075 file by creating temporary files containing assembler statements and
   3076 then assembling these.  The `-S' command line option can be used to
   3077 specify the path to the assembler that dlltool will use, and the `-f'
   3078 option can be used to pass specific flags to that assembler.  The `-n'
   3079 can be used to prevent dlltool from deleting these temporary assembler
   3080 files when it is done, and if `-n' is specified twice then this will
   3081 prevent dlltool from deleting the temporary object files it used to
   3082 build the library.
   3083 
   3084    Here is an example of creating a DLL from a source file `dll.c' and
   3085 also creating a program (from an object file called `program.o') that
   3086 uses that DLL:
   3087 
   3088        gcc -c dll.c
   3089        dlltool -e exports.o -l dll.lib dll.o
   3090        gcc dll.o exports.o -o dll.dll
   3091        gcc program.o dll.lib -o program
   3092 
   3093    `dlltool' may also be used to query an existing import library to
   3094 determine the name of the DLL to which it is associated.  See the
   3095 description of the `-I' or `--identify' option.
   3096 
   3097    The command line options have the following meanings:
   3098 
   3099 `-d FILENAME'
   3100 `--input-def FILENAME'
   3101      Specifies the name of a `.def' file to be read in and processed.
   3102 
   3103 `-b FILENAME'
   3104 `--base-file FILENAME'
   3105      Specifies the name of a base file to be read in and processed.  The
   3106      contents of this file will be added to the relocation section in
   3107      the exports file generated by dlltool.
   3108 
   3109 `-e FILENAME'
   3110 `--output-exp FILENAME'
   3111      Specifies the name of the export file to be created by dlltool.
   3112 
   3113 `-z FILENAME'
   3114 `--output-def FILENAME'
   3115      Specifies the name of the `.def' file to be created by dlltool.
   3116 
   3117 `-l FILENAME'
   3118 `--output-lib FILENAME'
   3119      Specifies the name of the library file to be created by dlltool.
   3120 
   3121 `-y FILENAME'
   3122 `--output-delaylib FILENAME'
   3123      Specifies the name of the delay-import library file to be created
   3124      by dlltool.
   3125 
   3126 `--export-all-symbols'
   3127      Treat all global and weak defined symbols found in the input object
   3128      files as symbols to be exported.  There is a small list of symbols
   3129      which are not exported by default; see the `--no-default-excludes'
   3130      option.  You may add to the list of symbols to not export by using
   3131      the `--exclude-symbols' option.
   3132 
   3133 `--no-export-all-symbols'
   3134      Only export symbols explicitly listed in an input `.def' file or in
   3135      `.drectve' sections in the input object files.  This is the default
   3136      behaviour.  The `.drectve' sections are created by `dllexport'
   3137      attributes in the source code.
   3138 
   3139 `--exclude-symbols LIST'
   3140      Do not export the symbols in LIST.  This is a list of symbol names
   3141      separated by comma or colon characters.  The symbol names should
   3142      not contain a leading underscore.  This is only meaningful when
   3143      `--export-all-symbols' is used.
   3144 
   3145 `--no-default-excludes'
   3146      When `--export-all-symbols' is used, it will by default avoid
   3147      exporting certain special symbols.  The current list of symbols to
   3148      avoid exporting is `DllMain@12', `DllEntryPoint@0', `impure_ptr'.
   3149      You may use the `--no-default-excludes' option to go ahead and
   3150      export these special symbols.  This is only meaningful when
   3151      `--export-all-symbols' is used.
   3152 
   3153 `-S PATH'
   3154 `--as PATH'
   3155      Specifies the path, including the filename, of the assembler to be
   3156      used to create the exports file.
   3157 
   3158 `-f OPTIONS'
   3159 `--as-flags OPTIONS'
   3160      Specifies any specific command line options to be passed to the
   3161      assembler when building the exports file.  This option will work
   3162      even if the `-S' option is not used.  This option only takes one
   3163      argument, and if it occurs more than once on the command line,
   3164      then later occurrences will override earlier occurrences.  So if
   3165      it is necessary to pass multiple options to the assembler they
   3166      should be enclosed in double quotes.
   3167 
   3168 `-D NAME'
   3169 `--dll-name NAME'
   3170      Specifies the name to be stored in the `.def' file as the name of
   3171      the DLL when the `-e' option is used.  If this option is not
   3172      present, then the filename given to the `-e' option will be used
   3173      as the name of the DLL.
   3174 
   3175 `-m MACHINE'
   3176 `-machine MACHINE'
   3177      Specifies the type of machine for which the library file should be
   3178      built.  `dlltool' has a built in default type, depending upon how
   3179      it was created, but this option can be used to override that.
   3180      This is normally only useful when creating DLLs for an ARM
   3181      processor, when the contents of the DLL are actually encode using
   3182      Thumb instructions.
   3183 
   3184 `-a'
   3185 `--add-indirect'
   3186      Specifies that when `dlltool' is creating the exports file it
   3187      should add a section which allows the exported functions to be
   3188      referenced without using the import library.  Whatever the hell
   3189      that means!
   3190 
   3191 `-U'
   3192 `--add-underscore'
   3193      Specifies that when `dlltool' is creating the exports file it
   3194      should prepend an underscore to the names of _all_ exported
   3195      symbols.
   3196 
   3197 `--no-leading-underscore'
   3198 
   3199 `--leading-underscore'
   3200      Specifies whether standard symbol should be forced to be prefixed,
   3201      or not.
   3202 
   3203 `--add-stdcall-underscore'
   3204      Specifies that when `dlltool' is creating the exports file it
   3205      should prepend an underscore to the names of exported _stdcall_
   3206      functions. Variable names and non-stdcall function names are not
   3207      modified.  This option is useful when creating GNU-compatible
   3208      import libs for third party DLLs that were built with MS-Windows
   3209      tools.
   3210 
   3211 `-k'
   3212 `--kill-at'
   3213      Specifies that when `dlltool' is creating the exports file it
   3214      should not append the string `@ <number>'.  These numbers are
   3215      called ordinal numbers and they represent another way of accessing
   3216      the function in a DLL, other than by name.
   3217 
   3218 `-A'
   3219 `--add-stdcall-alias'
   3220      Specifies that when `dlltool' is creating the exports file it
   3221      should add aliases for stdcall symbols without `@ <number>' in
   3222      addition to the symbols with `@ <number>'.
   3223 
   3224 `-p'
   3225 `--ext-prefix-alias PREFIX'
   3226      Causes `dlltool' to create external aliases for all DLL imports
   3227      with the specified prefix.  The aliases are created for both
   3228      external and import symbols with no leading underscore.
   3229 
   3230 `-x'
   3231 `--no-idata4'
   3232      Specifies that when `dlltool' is creating the exports and library
   3233      files it should omit the `.idata4' section.  This is for
   3234      compatibility with certain operating systems.
   3235 
   3236 `--use-nul-prefixed-import-tables'
   3237      Specifies that when `dlltool' is creating the exports and library
   3238      files it should prefix the `.idata4' and `.idata5' by zero an
   3239      element. This emulates old gnu import library generation of
   3240      `dlltool'. By default this option is turned off.
   3241 
   3242 `-c'
   3243 `--no-idata5'
   3244      Specifies that when `dlltool' is creating the exports and library
   3245      files it should omit the `.idata5' section.  This is for
   3246      compatibility with certain operating systems.
   3247 
   3248 `-I FILENAME'
   3249 `--identify FILENAME'
   3250      Specifies that `dlltool' should inspect the import library
   3251      indicated by FILENAME and report, on `stdout', the name(s) of the
   3252      associated DLL(s).  This can be performed in addition to any other
   3253      operations indicated by the other options and arguments.
   3254      `dlltool' fails if the import library does not exist or is not
   3255      actually an import library. See also `--identify-strict'.
   3256 
   3257 `--identify-strict'
   3258      Modifies the behavior of the `--identify' option, such that an
   3259      error is reported if FILENAME is associated with more than one DLL.
   3260 
   3261 `-i'
   3262 `--interwork'
   3263      Specifies that `dlltool' should mark the objects in the library
   3264      file and exports file that it produces as supporting interworking
   3265      between ARM and Thumb code.
   3266 
   3267 `-n'
   3268 `--nodelete'
   3269      Makes `dlltool' preserve the temporary assembler files it used to
   3270      create the exports file.  If this option is repeated then dlltool
   3271      will also preserve the temporary object files it uses to create
   3272      the library file.
   3273 
   3274 `-t PREFIX'
   3275 `--temp-prefix PREFIX'
   3276      Makes `dlltool' use PREFIX when constructing the names of
   3277      temporary assembler and object files.  By default, the temp file
   3278      prefix is generated from the pid.
   3279 
   3280 `-v'
   3281 `--verbose'
   3282      Make dlltool describe what it is doing.
   3283 
   3284 `-h'
   3285 `--help'
   3286      Displays a list of command line options and then exits.
   3287 
   3288 `-V'
   3289 `--version'
   3290      Displays dlltool's version number and then exits.
   3291 
   3292 
   3293 * Menu:
   3294 
   3295 * def file format::             The format of the dlltool `.def' file
   3296 
   3297 
   3298 File: binutils.info,  Node: def file format,  Up: dlltool
   3299 
   3300 14.1 The format of the `dlltool' `.def' file
   3301 ============================================
   3302 
   3303 A `.def' file contains any number of the following commands:
   3304 
   3305 `NAME' NAME `[ ,' BASE `]'
   3306      The result is going to be named NAME`.exe'.
   3307 
   3308 `LIBRARY' NAME `[ ,' BASE `]'
   3309      The result is going to be named NAME`.dll'.
   3310 
   3311 `EXPORTS ( ( (' NAME1 `[ = ' NAME2 `] ) | ( ' NAME1 `=' MODULE-NAME `.' EXTERNAL-NAME `) ) [ == ' ITS_NAME `]'
   3312 
   3313 `[' INTEGER `] [ NONAME ] [ CONSTANT ] [ DATA ] [ PRIVATE ] ) *'
   3314      Declares NAME1 as an exported symbol from the DLL, with optional
   3315      ordinal number INTEGER, or declares NAME1 as an alias (forward) of
   3316      the function EXTERNAL-NAME in the DLL.  If ITS_NAME is specified,
   3317      this name is used as string in export table.  MODULE-NAME.
   3318 
   3319 `IMPORTS ( (' INTERNAL-NAME `=' MODULE-NAME `.' INTEGER `) | [' INTERNAL-NAME `= ]' MODULE-NAME `.' EXTERNAL-NAME `) [ == ) ITS_NAME `]' *'
   3320      Declares that EXTERNAL-NAME or the exported function whose ordinal
   3321      number is INTEGER is to be imported from the file MODULE-NAME.  If
   3322      INTERNAL-NAME is specified then this is the name that the imported
   3323      function will be referred to in the body of the DLL.  If ITS_NAME
   3324      is specified, this name is used as string in import table.
   3325 
   3326 `DESCRIPTION' STRING
   3327      Puts STRING into the output `.exp' file in the `.rdata' section.
   3328 
   3329 `STACKSIZE' NUMBER-RESERVE `[, ' NUMBER-COMMIT `]'
   3330 
   3331 `HEAPSIZE' NUMBER-RESERVE `[, ' NUMBER-COMMIT `]'
   3332      Generates `--stack' or `--heap' NUMBER-RESERVE,NUMBER-COMMIT in
   3333      the output `.drectve' section.  The linker will see this and act
   3334      upon it.
   3335 
   3336 `CODE' ATTR `+'
   3337 
   3338 `DATA' ATTR `+'
   3339 
   3340 `SECTIONS (' SECTION-NAME ATTR` + ) *'
   3341      Generates `--attr' SECTION-NAME ATTR in the output `.drectve'
   3342      section, where ATTR is one of `READ', `WRITE', `EXECUTE' or
   3343      `SHARED'.  The linker will see this and act upon it.
   3344 
   3345 
   3346 
   3347 File: binutils.info,  Node: readelf,  Next: size,  Prev: ranlib,  Up: Top
   3348 
   3349 15 readelf
   3350 **********
   3351 
   3352      readelf [`-a'|`--all']
   3353              [`-h'|`--file-header']
   3354              [`-l'|`--program-headers'|`--segments']
   3355              [`-S'|`--section-headers'|`--sections']
   3356              [`-g'|`--section-groups']
   3357              [`-t'|`--section-details']
   3358              [`-e'|`--headers']
   3359              [`-s'|`--syms'|`--symbols']
   3360              [`--dyn-syms']
   3361              [`-n'|`--notes']
   3362              [`-r'|`--relocs']
   3363              [`-u'|`--unwind']
   3364              [`-d'|`--dynamic']
   3365              [`-V'|`--version-info']
   3366              [`-A'|`--arch-specific']
   3367              [`-D'|`--use-dynamic']
   3368              [`-x' <number or name>|`--hex-dump='<number or name>]
   3369              [`-p' <number or name>|`--string-dump='<number or name>]
   3370              [`-R' <number or name>|`--relocated-dump='<number or name>]
   3371              [`-c'|`--archive-index']
   3372              [`-w[lLiaprmfFsoRt]'|
   3373               `--debug-dump'[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges]]
   3374              [`-I'|`--histogram']
   3375              [`-v'|`--version']
   3376              [`-W'|`--wide']
   3377              [`-H'|`--help']
   3378              ELFFILE...
   3379 
   3380    `readelf' displays information about one or more ELF format object
   3381 files.  The options control what particular information to display.
   3382 
   3383    ELFFILE... are the object files to be examined.  32-bit and 64-bit
   3384 ELF files are supported, as are archives containing ELF files.
   3385 
   3386    This program performs a similar function to `objdump' but it goes
   3387 into more detail and it exists independently of the BFD library, so if
   3388 there is a bug in BFD then readelf will not be affected.
   3389 
   3390    The long and short forms of options, shown here as alternatives, are
   3391 equivalent.  At least one option besides `-v' or `-H' must be given.
   3392 
   3393 `-a'
   3394 `--all'
   3395      Equivalent to specifying `--file-header', `--program-headers',
   3396      `--sections', `--symbols', `--relocs', `--dynamic', `--notes' and
   3397      `--version-info'.
   3398 
   3399 `-h'
   3400 `--file-header'
   3401      Displays the information contained in the ELF header at the start
   3402      of the file.
   3403 
   3404 `-l'
   3405 `--program-headers'
   3406 `--segments'
   3407      Displays the information contained in the file's segment headers,
   3408      if it has any.
   3409 
   3410 `-S'
   3411 `--sections'
   3412 `--section-headers'
   3413      Displays the information contained in the file's section headers,
   3414      if it has any.
   3415 
   3416 `-g'
   3417 `--section-groups'
   3418      Displays the information contained in the file's section groups,
   3419      if it has any.
   3420 
   3421 `-t'
   3422 `--section-details'
   3423      Displays the detailed section information. Implies `-S'.
   3424 
   3425 `-s'
   3426 `--symbols'
   3427 `--syms'
   3428      Displays the entries in symbol table section of the file, if it
   3429      has one.
   3430 
   3431 `--dyn-syms'
   3432      Displays the entries in dynamic symbol table section of the file,
   3433      if it has one.
   3434 
   3435 `-e'
   3436 `--headers'
   3437      Display all the headers in the file.  Equivalent to `-h -l -S'.
   3438 
   3439 `-n'
   3440 `--notes'
   3441      Displays the contents of the NOTE segments and/or sections, if any.
   3442 
   3443 `-r'
   3444 `--relocs'
   3445      Displays the contents of the file's relocation section, if it has
   3446      one.
   3447 
   3448 `-u'
   3449 `--unwind'
   3450      Displays the contents of the file's unwind section, if it has one.
   3451      Only the unwind sections for IA64 ELF files, as well as ARM unwind
   3452      tables (`.ARM.exidx' / `.ARM.extab') are currently supported.
   3453 
   3454 `-d'
   3455 `--dynamic'
   3456      Displays the contents of the file's dynamic section, if it has one.
   3457 
   3458 `-V'
   3459 `--version-info'
   3460      Displays the contents of the version sections in the file, it they
   3461      exist.
   3462 
   3463 `-A'
   3464 `--arch-specific'
   3465      Displays architecture-specific information in the file, if there
   3466      is any.
   3467 
   3468 `-D'
   3469 `--use-dynamic'
   3470      When displaying symbols, this option makes `readelf' use the
   3471      symbol hash tables in the file's dynamic section, rather than the
   3472      symbol table sections.
   3473 
   3474 `-x <number or name>'
   3475 `--hex-dump=<number or name>'
   3476      Displays the contents of the indicated section as a hexadecimal
   3477      bytes.  A number identifies a particular section by index in the
   3478      section table; any other string identifies all sections with that
   3479      name in the object file.
   3480 
   3481 `-R <number or name>'
   3482 `--relocated-dump=<number or name>'
   3483      Displays the contents of the indicated section as a hexadecimal
   3484      bytes.  A number identifies a particular section by index in the
   3485      section table; any other string identifies all sections with that
   3486      name in the object file.  The contents of the section will be
   3487      relocated before they are displayed.
   3488 
   3489 `-p <number or name>'
   3490 `--string-dump=<number or name>'
   3491      Displays the contents of the indicated section as printable
   3492      strings.  A number identifies a particular section by index in the
   3493      section table; any other string identifies all sections with that
   3494      name in the object file.
   3495 
   3496 `-c'
   3497 `--archive-index'
   3498      Displays the file symbol index infomation contained in the header
   3499      part of binary archives.  Performs the same function as the `t'
   3500      command to `ar', but without using the BFD library.  *Note ar::.
   3501 
   3502 `-w[lLiaprmfFsoRt]'
   3503 `--debug-dump[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames,=frames-interp,=str,=loc,=Ranges,=pubtypes,=trace_info,=trace_abbrev,=trace_aranges]'
   3504      Displays the contents of the debug sections in the file, if any are
   3505      present.  If one of the optional letters or words follows the
   3506      switch then only data found in those specific sections will be
   3507      dumped.
   3508 
   3509      Note that there is no single letter option to display the content
   3510      of trace sections.
   3511 
   3512      Note: the `=decodedline' option will display the interpreted
   3513      contents of a .debug_line section whereas the `=rawline' option
   3514      dumps the contents in a raw format.
   3515 
   3516      Note: the `=frames-interp' option will display the interpreted
   3517      contents of a .debug_frame section whereas the `=frames' option
   3518      dumps the contents in a raw format.
   3519 
   3520 `-I'
   3521 `--histogram'
   3522      Display a histogram of bucket list lengths when displaying the
   3523      contents of the symbol tables.
   3524 
   3525 `-v'
   3526 `--version'
   3527      Display the version number of readelf.
   3528 
   3529 `-W'
   3530 `--wide'
   3531      Don't break output lines to fit into 80 columns. By default
   3532      `readelf' breaks section header and segment listing lines for
   3533      64-bit ELF files, so that they fit into 80 columns. This option
   3534      causes `readelf' to print each section header resp. each segment
   3535      one a single line, which is far more readable on terminals wider
   3536      than 80 columns.
   3537 
   3538 `-H'
   3539 `--help'
   3540      Display the command line options understood by `readelf'.
   3541 
   3542 
   3543 
   3544 File: binutils.info,  Node: elfedit,  Next: c++filt,  Prev: strip,  Up: Top
   3545 
   3546 16 elfedit
   3547 **********
   3548 
   3549      elfedit [`--input-mach='MACHINE]
   3550              [`--input-type='TYPE]
   3551              [`--input-osabi='OSBI]
   3552              `--output-mach='MACHINE
   3553              `--output-type='TYPE
   3554              `--output-osabi='OSBI
   3555              [`-v'|`--version']
   3556              [`-h'|`--help']
   3557              ELFFILE...
   3558 
   3559    `elfedit' updates the ELF header of ELF files which have the
   3560 matching ELF machine and file types.  The options control how and which
   3561 fields in the ELF header should be updated.
   3562 
   3563    ELFFILE... are the ELF files to be updated.  32-bit and 64-bit ELF
   3564 files are supported, as are archives containing ELF files.
   3565 
   3566    The long and short forms of options, shown here as alternatives, are
   3567 equivalent. At least one of the `--output-mach', `--output-type' and
   3568 `--output-osabi' options must be given.
   3569 
   3570 `--input-mach=MACHINE'
   3571      Set the matching input ELF machine type to MACHINE.  If
   3572      `--input-mach' isn't specified, it will match any ELF machine
   3573      types.
   3574 
   3575      The supported ELF machine types are, L1OM and X86-64.
   3576 
   3577 `--output-mach=MACHINE'
   3578      Change the ELF machine type in the ELF header to MACHINE.  The
   3579      supported ELF machine types are the same as `--input-mach'.
   3580 
   3581 `--input-type=TYPE'
   3582      Set the matching input ELF file type to TYPE.  If `--input-type'
   3583      isn't specified, it will match any ELF file types.
   3584 
   3585      The supported ELF file types are, REL, EXEC and DYN.
   3586 
   3587 `--output-type=TYPE'
   3588      Change the ELF file type in the ELF header to TYPE.  The supported
   3589      ELF types are the same as `--input-type'.
   3590 
   3591 `--input-osabi=OSABI'
   3592      Set the matching input ELF file OSABI to OSBI.  If `--input-osabi'
   3593      isn't specified, it will match any ELF OSABIs.
   3594 
   3595      The supported ELF OSABIs are, NONE, HPUX, NETBSD, LINUX, HURD,
   3596      SOLARIS, AIX, IRIX, FREEBSD, TRU64, MODESTO, OPENBSD, OPENVMS,
   3597      NSK, AROS and FENIXOS.
   3598 
   3599 `--output-osabi=OSABI'
   3600      Change the ELF OSABI in the ELF header to TYPE.  The supported ELF
   3601      OSABI are the same as `--input-osabi'.
   3602 
   3603 `-v'
   3604 `--version'
   3605      Display the version number of `elfedit'.
   3606 
   3607 `-h'
   3608 `--help'
   3609      Display the command line options understood by `elfedit'.
   3610 
   3611 
   3612 
   3613 File: binutils.info,  Node: Common Options,  Next: Selecting the Target System,  Prev: dlltool,  Up: Top
   3614 
   3615 17 Common Options
   3616 *****************
   3617 
   3618 The following command-line options are supported by all of the programs
   3619 described in this manual.
   3620 
   3621 `@FILE'
   3622      Read command-line options from FILE.  The options read are
   3623      inserted in place of the original @FILE option.  If FILE does not
   3624      exist, or cannot be read, then the option will be treated
   3625      literally, and not removed.
   3626 
   3627      Options in FILE are separated by whitespace.  A whitespace
   3628      character may be included in an option by surrounding the entire
   3629      option in either single or double quotes.  Any character
   3630      (including a backslash) may be included by prefixing the character
   3631      to be included with a backslash.  The FILE may itself contain
   3632      additional @FILE options; any such options will be processed
   3633      recursively.
   3634 
   3635 `--help'
   3636      Display the command-line options supported by the program.
   3637 
   3638 `--version'
   3639      Display the version number of the program.
   3640 
   3641 
   3642 
   3643 File: binutils.info,  Node: Selecting the Target System,  Next: Reporting Bugs,  Prev: Common Options,  Up: Top
   3644 
   3645 18 Selecting the Target System
   3646 ******************************
   3647 
   3648 You can specify two aspects of the target system to the GNU binary file
   3649 utilities, each in several ways:
   3650 
   3651    * the target
   3652 
   3653    * the architecture
   3654 
   3655    In the following summaries, the lists of ways to specify values are
   3656 in order of decreasing precedence.  The ways listed first override those
   3657 listed later.
   3658 
   3659    The commands to list valid values only list the values for which the
   3660 programs you are running were configured.  If they were configured with
   3661 `--enable-targets=all', the commands list most of the available values,
   3662 but a few are left out; not all targets can be configured in at once
   3663 because some of them can only be configured "native" (on hosts with the
   3664 same type as the target system).
   3665 
   3666 * Menu:
   3667 
   3668 * Target Selection::
   3669 * Architecture Selection::
   3670 
   3671 
   3672 File: binutils.info,  Node: Target Selection,  Next: Architecture Selection,  Up: Selecting the Target System
   3673 
   3674 18.1 Target Selection
   3675 =====================
   3676 
   3677 A "target" is an object file format.  A given target may be supported
   3678 for multiple architectures (*note Architecture Selection::).  A target
   3679 selection may also have variations for different operating systems or
   3680 architectures.
   3681 
   3682    The command to list valid target values is `objdump -i' (the first
   3683 column of output contains the relevant information).
   3684 
   3685    Some sample values are: `a.out-hp300bsd', `ecoff-littlemips',
   3686 `a.out-sunos-big'.
   3687 
   3688    You can also specify a target using a configuration triplet.  This is
   3689 the same sort of name that is passed to `configure' to specify a
   3690 target.  When you use a configuration triplet as an argument, it must be
   3691 fully canonicalized.  You can see the canonical version of a triplet by
   3692 running the shell script `config.sub' which is included with the
   3693 sources.
   3694 
   3695    Some sample configuration triplets are: `m68k-hp-bsd',
   3696 `mips-dec-ultrix', `sparc-sun-sunos'.
   3697 
   3698 `objdump' Target
   3699 ----------------
   3700 
   3701 Ways to specify:
   3702 
   3703   1. command line option: `-b' or `--target'
   3704 
   3705   2. environment variable `GNUTARGET'
   3706 
   3707   3. deduced from the input file
   3708 
   3709 `objcopy' and `strip' Input Target
   3710 ----------------------------------
   3711 
   3712 Ways to specify:
   3713 
   3714   1. command line options: `-I' or `--input-target', or `-F' or
   3715      `--target'
   3716 
   3717   2. environment variable `GNUTARGET'
   3718 
   3719   3. deduced from the input file
   3720 
   3721 `objcopy' and `strip' Output Target
   3722 -----------------------------------
   3723 
   3724 Ways to specify:
   3725 
   3726   1. command line options: `-O' or `--output-target', or `-F' or
   3727      `--target'
   3728 
   3729   2. the input target (see "`objcopy' and `strip' Input Target" above)
   3730 
   3731   3. environment variable `GNUTARGET'
   3732 
   3733   4. deduced from the input file
   3734 
   3735 `nm', `size', and `strings' Target
   3736 ----------------------------------
   3737 
   3738 Ways to specify:
   3739 
   3740   1. command line option: `--target'
   3741 
   3742   2. environment variable `GNUTARGET'
   3743 
   3744   3. deduced from the input file
   3745 
   3746 
   3747 File: binutils.info,  Node: Architecture Selection,  Prev: Target Selection,  Up: Selecting the Target System
   3748 
   3749 18.2 Architecture Selection
   3750 ===========================
   3751 
   3752 An "architecture" is a type of CPU on which an object file is to run.
   3753 Its name may contain a colon, separating the name of the processor
   3754 family from the name of the particular CPU.
   3755 
   3756    The command to list valid architecture values is `objdump -i' (the
   3757 second column contains the relevant information).
   3758 
   3759    Sample values: `m68k:68020', `mips:3000', `sparc'.
   3760 
   3761 `objdump' Architecture
   3762 ----------------------
   3763 
   3764 Ways to specify:
   3765 
   3766   1. command line option: `-m' or `--architecture'
   3767 
   3768   2. deduced from the input file
   3769 
   3770 `objcopy', `nm', `size', `strings' Architecture
   3771 -----------------------------------------------
   3772 
   3773 Ways to specify:
   3774 
   3775   1. deduced from the input file
   3776 
   3777 
   3778 File: binutils.info,  Node: Reporting Bugs,  Next: GNU Free Documentation License,  Prev: Selecting the Target System,  Up: Top
   3779 
   3780 19 Reporting Bugs
   3781 *****************
   3782 
   3783 Your bug reports play an essential role in making the binary utilities
   3784 reliable.
   3785 
   3786    Reporting a bug may help you by bringing a solution to your problem,
   3787 or it may not.  But in any case the principal function of a bug report
   3788 is to help the entire community by making the next version of the binary
   3789 utilities work better.  Bug reports are your contribution to their
   3790 maintenance.
   3791 
   3792    In order for a bug report to serve its purpose, you must include the
   3793 information that enables us to fix the bug.
   3794 
   3795 * Menu:
   3796 
   3797 * Bug Criteria::                Have you found a bug?
   3798 * Bug Reporting::               How to report bugs
   3799 
   3800 
   3801 File: binutils.info,  Node: Bug Criteria,  Next: Bug Reporting,  Up: Reporting Bugs
   3802 
   3803 19.1 Have You Found a Bug?
   3804 ==========================
   3805 
   3806 If you are not sure whether you have found a bug, here are some
   3807 guidelines:
   3808 
   3809    * If a binary utility gets a fatal signal, for any input whatever,
   3810      that is a bug.  Reliable utilities never crash.
   3811 
   3812    * If a binary utility produces an error message for valid input,
   3813      that is a bug.
   3814 
   3815    * If you are an experienced user of binary utilities, your
   3816      suggestions for improvement are welcome in any case.
   3817 
   3818 
   3819 File: binutils.info,  Node: Bug Reporting,  Prev: Bug Criteria,  Up: Reporting Bugs
   3820 
   3821 19.2 How to Report Bugs
   3822 =======================
   3823 
   3824 A number of companies and individuals offer support for GNU products.
   3825 If you obtained the binary utilities from a support organization, we
   3826 recommend you contact that organization first.
   3827 
   3828    You can find contact information for many support companies and
   3829 individuals in the file `etc/SERVICE' in the GNU Emacs distribution.
   3830 
   3831    In any event, we also recommend that you send bug reports for the
   3832 binary utilities to `http://www.sourceware.org/bugzilla/'.
   3833 
   3834    The fundamental principle of reporting bugs usefully is this:
   3835 *report all the facts*.  If you are not sure whether to state a fact or
   3836 leave it out, state it!
   3837 
   3838    Often people omit facts because they think they know what causes the
   3839 problem and assume that some details do not matter.  Thus, you might
   3840 assume that the name of a file you use in an example does not matter.
   3841 Well, probably it does not, but one cannot be sure.  Perhaps the bug is
   3842 a stray memory reference which happens to fetch from the location where
   3843 that pathname is stored in memory; perhaps, if the pathname were
   3844 different, the contents of that location would fool the utility into
   3845 doing the right thing despite the bug.  Play it safe and give a
   3846 specific, complete example.  That is the easiest thing for you to do,
   3847 and the most helpful.
   3848 
   3849    Keep in mind that the purpose of a bug report is to enable us to fix
   3850 the bug if it is new to us.  Therefore, always write your bug reports
   3851 on the assumption that the bug has not been reported previously.
   3852 
   3853    Sometimes people give a few sketchy facts and ask, "Does this ring a
   3854 bell?"  This cannot help us fix a bug, so it is basically useless.  We
   3855 respond by asking for enough details to enable us to investigate.  You
   3856 might as well expedite matters by sending them to begin with.
   3857 
   3858    To enable us to fix the bug, you should include all these things:
   3859 
   3860    * The version of the utility.  Each utility announces it if you
   3861      start it with the `--version' argument.
   3862 
   3863      Without this, we will not know whether there is any point in
   3864      looking for the bug in the current version of the binary utilities.
   3865 
   3866    * Any patches you may have applied to the source, including any
   3867      patches made to the `BFD' library.
   3868 
   3869    * The type of machine you are using, and the operating system name
   3870      and version number.
   3871 
   3872    * What compiler (and its version) was used to compile the
   3873      utilities--e.g.  "`gcc-2.7'".
   3874 
   3875    * The command arguments you gave the utility to observe the bug.  To
   3876      guarantee you will not omit something important, list them all.  A
   3877      copy of the Makefile (or the output from make) is sufficient.
   3878 
   3879      If we were to try to guess the arguments, we would probably guess
   3880      wrong and then we might not encounter the bug.
   3881 
   3882    * A complete input file, or set of input files, that will reproduce
   3883      the bug.  If the utility is reading an object file or files, then
   3884      it is generally most helpful to send the actual object files.
   3885 
   3886      If the source files were produced exclusively using GNU programs
   3887      (e.g., `gcc', `gas', and/or the GNU `ld'), then it may be OK to
   3888      send the source files rather than the object files.  In this case,
   3889      be sure to say exactly what version of `gcc', or whatever, was
   3890      used to produce the object files.  Also say how `gcc', or
   3891      whatever, was configured.
   3892 
   3893    * A description of what behavior you observe that you believe is
   3894      incorrect.  For example, "It gets a fatal signal."
   3895 
   3896      Of course, if the bug is that the utility gets a fatal signal,
   3897      then we will certainly notice it.  But if the bug is incorrect
   3898      output, we might not notice unless it is glaringly wrong.  You
   3899      might as well not give us a chance to make a mistake.
   3900 
   3901      Even if the problem you experience is a fatal signal, you should
   3902      still say so explicitly.  Suppose something strange is going on,
   3903      such as your copy of the utility is out of sync, or you have
   3904      encountered a bug in the C library on your system.  (This has
   3905      happened!)  Your copy might crash and ours would not.  If you told
   3906      us to expect a crash, then when ours fails to crash, we would know
   3907      that the bug was not happening for us.  If you had not told us to
   3908      expect a crash, then we would not be able to draw any conclusion
   3909      from our observations.
   3910 
   3911    * If you wish to suggest changes to the source, send us context
   3912      diffs, as generated by `diff' with the `-u', `-c', or `-p' option.
   3913      Always send diffs from the old file to the new file.  If you wish
   3914      to discuss something in the `ld' source, refer to it by context,
   3915      not by line number.
   3916 
   3917      The line numbers in our development sources will not match those
   3918      in your sources.  Your line numbers would convey no useful
   3919      information to us.
   3920 
   3921    Here are some things that are not necessary:
   3922 
   3923    * A description of the envelope of the bug.
   3924 
   3925      Often people who encounter a bug spend a lot of time investigating
   3926      which changes to the input file will make the bug go away and which
   3927      changes will not affect it.
   3928 
   3929      This is often time consuming and not very useful, because the way
   3930      we will find the bug is by running a single example under the
   3931      debugger with breakpoints, not by pure deduction from a series of
   3932      examples.  We recommend that you save your time for something else.
   3933 
   3934      Of course, if you can find a simpler example to report _instead_
   3935      of the original one, that is a convenience for us.  Errors in the
   3936      output will be easier to spot, running under the debugger will take
   3937      less time, and so on.
   3938 
   3939      However, simplification is not vital; if you do not want to do
   3940      this, report the bug anyway and send us the entire test case you
   3941      used.
   3942 
   3943    * A patch for the bug.
   3944 
   3945      A patch for the bug does help us if it is a good one.  But do not
   3946      omit the necessary information, such as the test case, on the
   3947      assumption that a patch is all we need.  We might see problems
   3948      with your patch and decide to fix the problem another way, or we
   3949      might not understand it at all.
   3950 
   3951      Sometimes with programs as complicated as the binary utilities it
   3952      is very hard to construct an example that will make the program
   3953      follow a certain path through the code.  If you do not send us the
   3954      example, we will not be able to construct one, so we will not be
   3955      able to verify that the bug is fixed.
   3956 
   3957      And if we cannot understand what bug you are trying to fix, or why
   3958      your patch should be an improvement, we will not install it.  A
   3959      test case will help us to understand.
   3960 
   3961    * A guess about what the bug is or what it depends on.
   3962 
   3963      Such guesses are usually wrong.  Even we cannot guess right about
   3964      such things without first using the debugger to find the facts.
   3965 
   3966 
   3967 File: binutils.info,  Node: GNU Free Documentation License,  Next: Binutils Index,  Prev: Reporting Bugs,  Up: Top
   3968 
   3969 Appendix A GNU Free Documentation License
   3970 *****************************************
   3971 
   3972                      Version 1.3, 3 November 2008
   3973 
   3974      Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
   3975      `http://fsf.org/'
   3976 
   3977      Everyone is permitted to copy and distribute verbatim copies
   3978      of this license document, but changing it is not allowed.
   3979 
   3980   0. PREAMBLE
   3981 
   3982      The purpose of this License is to make a manual, textbook, or other
   3983      functional and useful document "free" in the sense of freedom: to
   3984      assure everyone the effective freedom to copy and redistribute it,
   3985      with or without modifying it, either commercially or
   3986      noncommercially.  Secondarily, this License preserves for the
   3987      author and publisher a way to get credit for their work, while not
   3988      being considered responsible for modifications made by others.
   3989 
   3990      This License is a kind of "copyleft", which means that derivative
   3991      works of the document must themselves be free in the same sense.
   3992      It complements the GNU General Public License, which is a copyleft
   3993      license designed for free software.
   3994 
   3995      We have designed this License in order to use it for manuals for
   3996      free software, because free software needs free documentation: a
   3997      free program should come with manuals providing the same freedoms
   3998      that the software does.  But this License is not limited to
   3999      software manuals; it can be used for any textual work, regardless
   4000      of subject matter or whether it is published as a printed book.
   4001      We recommend this License principally for works whose purpose is
   4002      instruction or reference.
   4003 
   4004   1. APPLICABILITY AND DEFINITIONS
   4005 
   4006      This License applies to any manual or other work, in any medium,
   4007      that contains a notice placed by the copyright holder saying it
   4008      can be distributed under the terms of this License.  Such a notice
   4009      grants a world-wide, royalty-free license, unlimited in duration,
   4010      to use that work under the conditions stated herein.  The
   4011      "Document", below, refers to any such manual or work.  Any member
   4012      of the public is a licensee, and is addressed as "you".  You
   4013      accept the license if you copy, modify or distribute the work in a
   4014      way requiring permission under copyright law.
   4015 
   4016      A "Modified Version" of the Document means any work containing the
   4017      Document or a portion of it, either copied verbatim, or with
   4018      modifications and/or translated into another language.
   4019 
   4020      A "Secondary Section" is a named appendix or a front-matter section
   4021      of the Document that deals exclusively with the relationship of the
   4022      publishers or authors of the Document to the Document's overall
   4023      subject (or to related matters) and contains nothing that could
   4024      fall directly within that overall subject.  (Thus, if the Document
   4025      is in part a textbook of mathematics, a Secondary Section may not
   4026      explain any mathematics.)  The relationship could be a matter of
   4027      historical connection with the subject or with related matters, or
   4028      of legal, commercial, philosophical, ethical or political position
   4029      regarding them.
   4030 
   4031      The "Invariant Sections" are certain Secondary Sections whose
   4032      titles are designated, as being those of Invariant Sections, in
   4033      the notice that says that the Document is released under this
   4034      License.  If a section does not fit the above definition of
   4035      Secondary then it is not allowed to be designated as Invariant.
   4036      The Document may contain zero Invariant Sections.  If the Document
   4037      does not identify any Invariant Sections then there are none.
   4038 
   4039      The "Cover Texts" are certain short passages of text that are
   4040      listed, as Front-Cover Texts or Back-Cover Texts, in the notice
   4041      that says that the Document is released under this License.  A
   4042      Front-Cover Text may be at most 5 words, and a Back-Cover Text may
   4043      be at most 25 words.
   4044 
   4045      A "Transparent" copy of the Document means a machine-readable copy,
   4046      represented in a format whose specification is available to the
   4047      general public, that is suitable for revising the document
   4048      straightforwardly with generic text editors or (for images
   4049      composed of pixels) generic paint programs or (for drawings) some
   4050      widely available drawing editor, and that is suitable for input to
   4051      text formatters or for automatic translation to a variety of
   4052      formats suitable for input to text formatters.  A copy made in an
   4053      otherwise Transparent file format whose markup, or absence of
   4054      markup, has been arranged to thwart or discourage subsequent
   4055      modification by readers is not Transparent.  An image format is
   4056      not Transparent if used for any substantial amount of text.  A
   4057      copy that is not "Transparent" is called "Opaque".
   4058 
   4059      Examples of suitable formats for Transparent copies include plain
   4060      ASCII without markup, Texinfo input format, LaTeX input format,
   4061      SGML or XML using a publicly available DTD, and
   4062      standard-conforming simple HTML, PostScript or PDF designed for
   4063      human modification.  Examples of transparent image formats include
   4064      PNG, XCF and JPG.  Opaque formats include proprietary formats that
   4065      can be read and edited only by proprietary word processors, SGML or
   4066      XML for which the DTD and/or processing tools are not generally
   4067      available, and the machine-generated HTML, PostScript or PDF
   4068      produced by some word processors for output purposes only.
   4069 
   4070      The "Title Page" means, for a printed book, the title page itself,
   4071      plus such following pages as are needed to hold, legibly, the
   4072      material this License requires to appear in the title page.  For
   4073      works in formats which do not have any title page as such, "Title
   4074      Page" means the text near the most prominent appearance of the
   4075      work's title, preceding the beginning of the body of the text.
   4076 
   4077      The "publisher" means any person or entity that distributes copies
   4078      of the Document to the public.
   4079 
   4080      A section "Entitled XYZ" means a named subunit of the Document
   4081      whose title either is precisely XYZ or contains XYZ in parentheses
   4082      following text that translates XYZ in another language.  (Here XYZ
   4083      stands for a specific section name mentioned below, such as
   4084      "Acknowledgements", "Dedications", "Endorsements", or "History".)
   4085      To "Preserve the Title" of such a section when you modify the
   4086      Document means that it remains a section "Entitled XYZ" according
   4087      to this definition.
   4088 
   4089      The Document may include Warranty Disclaimers next to the notice
   4090      which states that this License applies to the Document.  These
   4091      Warranty Disclaimers are considered to be included by reference in
   4092      this License, but only as regards disclaiming warranties: any other
   4093      implication that these Warranty Disclaimers may have is void and
   4094      has no effect on the meaning of this License.
   4095 
   4096   2. VERBATIM COPYING
   4097 
   4098      You may copy and distribute the Document in any medium, either
   4099      commercially or noncommercially, provided that this License, the
   4100      copyright notices, and the license notice saying this License
   4101      applies to the Document are reproduced in all copies, and that you
   4102      add no other conditions whatsoever to those of this License.  You
   4103      may not use technical measures to obstruct or control the reading
   4104      or further copying of the copies you make or distribute.  However,
   4105      you may accept compensation in exchange for copies.  If you
   4106      distribute a large enough number of copies you must also follow
   4107      the conditions in section 3.
   4108 
   4109      You may also lend copies, under the same conditions stated above,
   4110      and you may publicly display copies.
   4111 
   4112   3. COPYING IN QUANTITY
   4113 
   4114      If you publish printed copies (or copies in media that commonly
   4115      have printed covers) of the Document, numbering more than 100, and
   4116      the Document's license notice requires Cover Texts, you must
   4117      enclose the copies in covers that carry, clearly and legibly, all
   4118      these Cover Texts: Front-Cover Texts on the front cover, and
   4119      Back-Cover Texts on the back cover.  Both covers must also clearly
   4120      and legibly identify you as the publisher of these copies.  The
   4121      front cover must present the full title with all words of the
   4122      title equally prominent and visible.  You may add other material
   4123      on the covers in addition.  Copying with changes limited to the
   4124      covers, as long as they preserve the title of the Document and
   4125      satisfy these conditions, can be treated as verbatim copying in
   4126      other respects.
   4127 
   4128      If the required texts for either cover are too voluminous to fit
   4129      legibly, you should put the first ones listed (as many as fit
   4130      reasonably) on the actual cover, and continue the rest onto
   4131      adjacent pages.
   4132 
   4133      If you publish or distribute Opaque copies of the Document
   4134      numbering more than 100, you must either include a
   4135      machine-readable Transparent copy along with each Opaque copy, or
   4136      state in or with each Opaque copy a computer-network location from
   4137      which the general network-using public has access to download
   4138      using public-standard network protocols a complete Transparent
   4139      copy of the Document, free of added material.  If you use the
   4140      latter option, you must take reasonably prudent steps, when you
   4141      begin distribution of Opaque copies in quantity, to ensure that
   4142      this Transparent copy will remain thus accessible at the stated
   4143      location until at least one year after the last time you
   4144      distribute an Opaque copy (directly or through your agents or
   4145      retailers) of that edition to the public.
   4146 
   4147      It is requested, but not required, that you contact the authors of
   4148      the Document well before redistributing any large number of
   4149      copies, to give them a chance to provide you with an updated
   4150      version of the Document.
   4151 
   4152   4. MODIFICATIONS
   4153 
   4154      You may copy and distribute a Modified Version of the Document
   4155      under the conditions of sections 2 and 3 above, provided that you
   4156      release the Modified Version under precisely this License, with
   4157      the Modified Version filling the role of the Document, thus
   4158      licensing distribution and modification of the Modified Version to
   4159      whoever possesses a copy of it.  In addition, you must do these
   4160      things in the Modified Version:
   4161 
   4162        A. Use in the Title Page (and on the covers, if any) a title
   4163           distinct from that of the Document, and from those of
   4164           previous versions (which should, if there were any, be listed
   4165           in the History section of the Document).  You may use the
   4166           same title as a previous version if the original publisher of
   4167           that version gives permission.
   4168 
   4169        B. List on the Title Page, as authors, one or more persons or
   4170           entities responsible for authorship of the modifications in
   4171           the Modified Version, together with at least five of the
   4172           principal authors of the Document (all of its principal
   4173           authors, if it has fewer than five), unless they release you
   4174           from this requirement.
   4175 
   4176        C. State on the Title page the name of the publisher of the
   4177           Modified Version, as the publisher.
   4178 
   4179        D. Preserve all the copyright notices of the Document.
   4180 
   4181        E. Add an appropriate copyright notice for your modifications
   4182           adjacent to the other copyright notices.
   4183 
   4184        F. Include, immediately after the copyright notices, a license
   4185           notice giving the public permission to use the Modified
   4186           Version under the terms of this License, in the form shown in
   4187           the Addendum below.
   4188 
   4189        G. Preserve in that license notice the full lists of Invariant
   4190           Sections and required Cover Texts given in the Document's
   4191           license notice.
   4192 
   4193        H. Include an unaltered copy of this License.
   4194 
   4195        I. Preserve the section Entitled "History", Preserve its Title,
   4196           and add to it an item stating at least the title, year, new
   4197           authors, and publisher of the Modified Version as given on
   4198           the Title Page.  If there is no section Entitled "History" in
   4199           the Document, create one stating the title, year, authors,
   4200           and publisher of the Document as given on its Title Page,
   4201           then add an item describing the Modified Version as stated in
   4202           the previous sentence.
   4203 
   4204        J. Preserve the network location, if any, given in the Document
   4205           for public access to a Transparent copy of the Document, and
   4206           likewise the network locations given in the Document for
   4207           previous versions it was based on.  These may be placed in
   4208           the "History" section.  You may omit a network location for a
   4209           work that was published at least four years before the
   4210           Document itself, or if the original publisher of the version
   4211           it refers to gives permission.
   4212 
   4213        K. For any section Entitled "Acknowledgements" or "Dedications",
   4214           Preserve the Title of the section, and preserve in the
   4215           section all the substance and tone of each of the contributor
   4216           acknowledgements and/or dedications given therein.
   4217 
   4218        L. Preserve all the Invariant Sections of the Document,
   4219           unaltered in their text and in their titles.  Section numbers
   4220           or the equivalent are not considered part of the section
   4221           titles.
   4222 
   4223        M. Delete any section Entitled "Endorsements".  Such a section
   4224           may not be included in the Modified Version.
   4225 
   4226        N. Do not retitle any existing section to be Entitled
   4227           "Endorsements" or to conflict in title with any Invariant
   4228           Section.
   4229 
   4230        O. Preserve any Warranty Disclaimers.
   4231 
   4232      If the Modified Version includes new front-matter sections or
   4233      appendices that qualify as Secondary Sections and contain no
   4234      material copied from the Document, you may at your option
   4235      designate some or all of these sections as invariant.  To do this,
   4236      add their titles to the list of Invariant Sections in the Modified
   4237      Version's license notice.  These titles must be distinct from any
   4238      other section titles.
   4239 
   4240      You may add a section Entitled "Endorsements", provided it contains
   4241      nothing but endorsements of your Modified Version by various
   4242      parties--for example, statements of peer review or that the text
   4243      has been approved by an organization as the authoritative
   4244      definition of a standard.
   4245 
   4246      You may add a passage of up to five words as a Front-Cover Text,
   4247      and a passage of up to 25 words as a Back-Cover Text, to the end
   4248      of the list of Cover Texts in the Modified Version.  Only one
   4249      passage of Front-Cover Text and one of Back-Cover Text may be
   4250      added by (or through arrangements made by) any one entity.  If the
   4251      Document already includes a cover text for the same cover,
   4252      previously added by you or by arrangement made by the same entity
   4253      you are acting on behalf of, you may not add another; but you may
   4254      replace the old one, on explicit permission from the previous
   4255      publisher that added the old one.
   4256 
   4257      The author(s) and publisher(s) of the Document do not by this
   4258      License give permission to use their names for publicity for or to
   4259      assert or imply endorsement of any Modified Version.
   4260 
   4261   5. COMBINING DOCUMENTS
   4262 
   4263      You may combine the Document with other documents released under
   4264      this License, under the terms defined in section 4 above for
   4265      modified versions, provided that you include in the combination
   4266      all of the Invariant Sections of all of the original documents,
   4267      unmodified, and list them all as Invariant Sections of your
   4268      combined work in its license notice, and that you preserve all
   4269      their Warranty Disclaimers.
   4270 
   4271      The combined work need only contain one copy of this License, and
   4272      multiple identical Invariant Sections may be replaced with a single
   4273      copy.  If there are multiple Invariant Sections with the same name
   4274      but different contents, make the title of each such section unique
   4275      by adding at the end of it, in parentheses, the name of the
   4276      original author or publisher of that section if known, or else a
   4277      unique number.  Make the same adjustment to the section titles in
   4278      the list of Invariant Sections in the license notice of the
   4279      combined work.
   4280 
   4281      In the combination, you must combine any sections Entitled
   4282      "History" in the various original documents, forming one section
   4283      Entitled "History"; likewise combine any sections Entitled
   4284      "Acknowledgements", and any sections Entitled "Dedications".  You
   4285      must delete all sections Entitled "Endorsements."
   4286 
   4287   6. COLLECTIONS OF DOCUMENTS
   4288 
   4289      You may make a collection consisting of the Document and other
   4290      documents released under this License, and replace the individual
   4291      copies of this License in the various documents with a single copy
   4292      that is included in the collection, provided that you follow the
   4293      rules of this License for verbatim copying of each of the
   4294      documents in all other respects.
   4295 
   4296      You may extract a single document from such a collection, and
   4297      distribute it individually under this License, provided you insert
   4298      a copy of this License into the extracted document, and follow
   4299      this License in all other respects regarding verbatim copying of
   4300      that document.
   4301 
   4302   7. AGGREGATION WITH INDEPENDENT WORKS
   4303 
   4304      A compilation of the Document or its derivatives with other
   4305      separate and independent documents or works, in or on a volume of
   4306      a storage or distribution medium, is called an "aggregate" if the
   4307      copyright resulting from the compilation is not used to limit the
   4308      legal rights of the compilation's users beyond what the individual
   4309      works permit.  When the Document is included in an aggregate, this
   4310      License does not apply to the other works in the aggregate which
   4311      are not themselves derivative works of the Document.
   4312 
   4313      If the Cover Text requirement of section 3 is applicable to these
   4314      copies of the Document, then if the Document is less than one half
   4315      of the entire aggregate, the Document's Cover Texts may be placed
   4316      on covers that bracket the Document within the aggregate, or the
   4317      electronic equivalent of covers if the Document is in electronic
   4318      form.  Otherwise they must appear on printed covers that bracket
   4319      the whole aggregate.
   4320 
   4321   8. TRANSLATION
   4322 
   4323      Translation is considered a kind of modification, so you may
   4324      distribute translations of the Document under the terms of section
   4325      4.  Replacing Invariant Sections with translations requires special
   4326      permission from their copyright holders, but you may include
   4327      translations of some or all Invariant Sections in addition to the
   4328      original versions of these Invariant Sections.  You may include a
   4329      translation of this License, and all the license notices in the
   4330      Document, and any Warranty Disclaimers, provided that you also
   4331      include the original English version of this License and the
   4332      original versions of those notices and disclaimers.  In case of a
   4333      disagreement between the translation and the original version of
   4334      this License or a notice or disclaimer, the original version will
   4335      prevail.
   4336 
   4337      If a section in the Document is Entitled "Acknowledgements",
   4338      "Dedications", or "History", the requirement (section 4) to
   4339      Preserve its Title (section 1) will typically require changing the
   4340      actual title.
   4341 
   4342   9. TERMINATION
   4343 
   4344      You may not copy, modify, sublicense, or distribute the Document
   4345      except as expressly provided under this License.  Any attempt
   4346      otherwise to copy, modify, sublicense, or distribute it is void,
   4347      and will automatically terminate your rights under this License.
   4348 
   4349      However, if you cease all violation of this License, then your
   4350      license from a particular copyright holder is reinstated (a)
   4351      provisionally, unless and until the copyright holder explicitly
   4352      and finally terminates your license, and (b) permanently, if the
   4353      copyright holder fails to notify you of the violation by some
   4354      reasonable means prior to 60 days after the cessation.
   4355 
   4356      Moreover, your license from a particular copyright holder is
   4357      reinstated permanently if the copyright holder notifies you of the
   4358      violation by some reasonable means, this is the first time you have
   4359      received notice of violation of this License (for any work) from
   4360      that copyright holder, and you cure the violation prior to 30 days
   4361      after your receipt of the notice.
   4362 
   4363      Termination of your rights under this section does not terminate
   4364      the licenses of parties who have received copies or rights from
   4365      you under this License.  If your rights have been terminated and
   4366      not permanently reinstated, receipt of a copy of some or all of
   4367      the same material does not give you any rights to use it.
   4368 
   4369  10. FUTURE REVISIONS OF THIS LICENSE
   4370 
   4371      The Free Software Foundation may publish new, revised versions of
   4372      the GNU Free Documentation License from time to time.  Such new
   4373      versions will be similar in spirit to the present version, but may
   4374      differ in detail to address new problems or concerns.  See
   4375      `http://www.gnu.org/copyleft/'.
   4376 
   4377      Each version of the License is given a distinguishing version
   4378      number.  If the Document specifies that a particular numbered
   4379      version of this License "or any later version" applies to it, you
   4380      have the option of following the terms and conditions either of
   4381      that specified version or of any later version that has been
   4382      published (not as a draft) by the Free Software Foundation.  If
   4383      the Document does not specify a version number of this License,
   4384      you may choose any version ever published (not as a draft) by the
   4385      Free Software Foundation.  If the Document specifies that a proxy
   4386      can decide which future versions of this License can be used, that
   4387      proxy's public statement of acceptance of a version permanently
   4388      authorizes you to choose that version for the Document.
   4389 
   4390  11. RELICENSING
   4391 
   4392      "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
   4393      World Wide Web server that publishes copyrightable works and also
   4394      provides prominent facilities for anybody to edit those works.  A
   4395      public wiki that anybody can edit is an example of such a server.
   4396      A "Massive Multiauthor Collaboration" (or "MMC") contained in the
   4397      site means any set of copyrightable works thus published on the MMC
   4398      site.
   4399 
   4400      "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
   4401      license published by Creative Commons Corporation, a not-for-profit
   4402      corporation with a principal place of business in San Francisco,
   4403      California, as well as future copyleft versions of that license
   4404      published by that same organization.
   4405 
   4406      "Incorporate" means to publish or republish a Document, in whole or
   4407      in part, as part of another Document.
   4408 
   4409      An MMC is "eligible for relicensing" if it is licensed under this
   4410      License, and if all works that were first published under this
   4411      License somewhere other than this MMC, and subsequently
   4412      incorporated in whole or in part into the MMC, (1) had no cover
   4413      texts or invariant sections, and (2) were thus incorporated prior
   4414      to November 1, 2008.
   4415 
   4416      The operator of an MMC Site may republish an MMC contained in the
   4417      site under CC-BY-SA on the same site at any time before August 1,
   4418      2009, provided the MMC is eligible for relicensing.
   4419 
   4420 
   4421 ADDENDUM: How to use this License for your documents
   4422 ====================================================
   4423 
   4424 To use this License in a document you have written, include a copy of
   4425 the License in the document and put the following copyright and license
   4426 notices just after the title page:
   4427 
   4428        Copyright (C)  YEAR  YOUR NAME.
   4429        Permission is granted to copy, distribute and/or modify this document
   4430        under the terms of the GNU Free Documentation License, Version 1.3
   4431        or any later version published by the Free Software Foundation;
   4432        with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
   4433        Texts.  A copy of the license is included in the section entitled ``GNU
   4434        Free Documentation License''.
   4435 
   4436    If you have Invariant Sections, Front-Cover Texts and Back-Cover
   4437 Texts, replace the "with...Texts." line with this:
   4438 
   4439          with the Invariant Sections being LIST THEIR TITLES, with
   4440          the Front-Cover Texts being LIST, and with the Back-Cover Texts
   4441          being LIST.
   4442 
   4443    If you have Invariant Sections without Cover Texts, or some other
   4444 combination of the three, merge those two alternatives to suit the
   4445 situation.
   4446 
   4447    If your document contains nontrivial examples of program code, we
   4448 recommend releasing these examples in parallel under your choice of
   4449 free software license, such as the GNU General Public License, to
   4450 permit their use in free software.
   4451 
   4452 
   4453 File: binutils.info,  Node: Binutils Index,  Prev: GNU Free Documentation License,  Up: Top
   4454 
   4455 Binutils Index
   4456 **************
   4457 
   4458 [index]
   4459 * Menu:
   4460 
   4461 * .stab:                                 objdump.             (line 373)
   4462 * Add prefix to absolute paths:          objdump.             (line 341)
   4463 * addr2line:                             addr2line.           (line   6)
   4464 * address to file name and line number:  addr2line.           (line   6)
   4465 * all header information, object file:   objdump.             (line 492)
   4466 * ar:                                    ar.                  (line   6)
   4467 * ar compatibility:                      ar.                  (line  50)
   4468 * architecture:                          objdump.             (line 195)
   4469 * architectures available:               objdump.             (line 180)
   4470 * archive contents:                      ranlib.              (line   6)
   4471 * Archive file symbol index information: readelf.             (line 152)
   4472 * archive headers:                       objdump.             (line  65)
   4473 * archives:                              ar.                  (line   6)
   4474 * base files:                            dlltool.             (line 124)
   4475 * bug criteria:                          Bug Criteria.        (line   6)
   4476 * bug reports:                           Bug Reporting.       (line   6)
   4477 * bugs:                                  Reporting Bugs.      (line   6)
   4478 * bugs, reporting:                       Bug Reporting.       (line   6)
   4479 * c++filt:                               c++filt.             (line   6)
   4480 * changing object addresses:             objcopy.             (line 308)
   4481 * changing section address:              objcopy.             (line 318)
   4482 * changing section LMA:                  objcopy.             (line 326)
   4483 * changing section VMA:                  objcopy.             (line 339)
   4484 * changing start address:                objcopy.             (line 303)
   4485 * collections of files:                  ar.                  (line   6)
   4486 * compatibility, ar:                     ar.                  (line  50)
   4487 * contents of archive:                   ar cmdline.          (line  94)
   4488 * crash:                                 Bug Criteria.        (line   9)
   4489 * creating archives:                     ar cmdline.          (line 135)
   4490 * creating thin archive:                 ar cmdline.          (line 196)
   4491 * cxxfilt:                               c++filt.             (line  14)
   4492 * dates in archive:                      ar cmdline.          (line 170)
   4493 * debug symbols:                         objdump.             (line 363)
   4494 * debugging symbols:                     nm.                  (line 141)
   4495 * deleting from archive:                 ar cmdline.          (line  26)
   4496 * demangling C++ symbols:                c++filt.             (line   6)
   4497 * demangling in nm:                      nm.                  (line 149)
   4498 * demangling in objdump <1>:             addr2line.           (line  64)
   4499 * demangling in objdump:                 objdump.             (line  93)
   4500 * deterministic archives:                ar cmdline.          (line 141)
   4501 * disassembling object code:             objdump.             (line 115)
   4502 * disassembly architecture:              objdump.             (line 195)
   4503 * disassembly endianness:                objdump.             (line 135)
   4504 * disassembly, with source:              objdump.             (line 337)
   4505 * discarding symbols:                    strip.               (line   6)
   4506 * DLL:                                   dlltool.             (line   6)
   4507 * dlltool:                               dlltool.             (line   6)
   4508 * DWARF:                                 objdump.             (line 363)
   4509 * dynamic relocation entries, in object file: objdump.        (line 325)
   4510 * dynamic symbol table entries, printing: objdump.            (line 476)
   4511 * dynamic symbols:                       nm.                  (line 161)
   4512 * ELF dynamic section information:       readelf.             (line 110)
   4513 * ELF dynamic symbol table information:  readelf.             (line  86)
   4514 * ELF file header information:           readelf.             (line  55)
   4515 * ELF file information:                  readelf.             (line   6)
   4516 * ELF notes:                             readelf.             (line  95)
   4517 * ELF object file format:                objdump.             (line 373)
   4518 * ELF program header information:        readelf.             (line  61)
   4519 * ELF reloc information:                 readelf.             (line  99)
   4520 * ELF section group information:         readelf.             (line  72)
   4521 * ELF section information:               readelf.             (line  67)
   4522 * ELF segment information:               readelf.             (line  61)
   4523 * ELF symbol table information:          readelf.             (line  82)
   4524 * ELF version sections informations:     readelf.             (line 114)
   4525 * elfedit:                               elfedit.             (line   6)
   4526 * endianness:                            objdump.             (line 135)
   4527 * error on valid input:                  Bug Criteria.        (line  12)
   4528 * external symbols:                      nm.                  (line 173)
   4529 * extract from archive:                  ar cmdline.          (line 109)
   4530 * fatal signal:                          Bug Criteria.        (line   9)
   4531 * file name:                             nm.                  (line 135)
   4532 * header information, all:               objdump.             (line 492)
   4533 * input .def file:                       dlltool.             (line 120)
   4534 * input file name:                       nm.                  (line 135)
   4535 * Instruction width:                     objdump.             (line 358)
   4536 * libraries:                             ar.                  (line  25)
   4537 * listings strings:                      strings.             (line   6)
   4538 * load plugin:                           nm.                  (line 176)
   4539 * machine instructions:                  objdump.             (line 115)
   4540 * moving in archive:                     ar cmdline.          (line  34)
   4541 * MRI compatibility, ar:                 ar scripts.          (line   8)
   4542 * name duplication in archive:           ar cmdline.          (line 103)
   4543 * name length:                           ar.                  (line  18)
   4544 * nm:                                    nm.                  (line   6)
   4545 * nm compatibility:                      nm.                  (line 145)
   4546 * nm format:                             nm.                  (line 145)
   4547 * not writing archive index:             ar cmdline.          (line 189)
   4548 * objdump:                               objdump.             (line   6)
   4549 * object code format <1>:                addr2line.           (line  59)
   4550 * object code format <2>:                strings.             (line  67)
   4551 * object code format <3>:                size.                (line  84)
   4552 * object code format <4>:                objdump.             (line  79)
   4553 * object code format:                    nm.                  (line 244)
   4554 * object file header:                    objdump.             (line 141)
   4555 * object file information:               objdump.             (line   6)
   4556 * object file offsets:                   objdump.             (line 146)
   4557 * object file sections:                  objdump.             (line 332)
   4558 * object formats available:              objdump.             (line 180)
   4559 * operations on archive:                 ar cmdline.          (line  22)
   4560 * printing from archive:                 ar cmdline.          (line  46)
   4561 * printing strings:                      strings.             (line   6)
   4562 * quick append to archive:               ar cmdline.          (line  54)
   4563 * radix for section sizes:               size.                (line  66)
   4564 * ranlib <1>:                            ranlib.              (line   6)
   4565 * ranlib:                                ar cmdline.          (line  88)
   4566 * readelf:                               readelf.             (line   6)
   4567 * relative placement in archive:         ar cmdline.          (line 123)
   4568 * relocation entries, in object file:    objdump.             (line 319)
   4569 * removing symbols:                      strip.               (line   6)
   4570 * repeated names in archive:             ar cmdline.          (line 103)
   4571 * replacement in archive:                ar cmdline.          (line  70)
   4572 * reporting bugs:                        Reporting Bugs.      (line   6)
   4573 * scripts, ar:                           ar scripts.          (line   8)
   4574 * section addresses in objdump:          objdump.             (line  71)
   4575 * section headers:                       objdump.             (line 162)
   4576 * section information:                   objdump.             (line 185)
   4577 * section sizes:                         size.                (line   6)
   4578 * sections, full contents:               objdump.             (line 332)
   4579 * size:                                  size.                (line   6)
   4580 * size display format:                   size.                (line  27)
   4581 * size number format:                    size.                (line  66)
   4582 * sorting symbols:                       nm.                  (line 197)
   4583 * source code context:                   objdump.             (line 155)
   4584 * source disassembly:                    objdump.             (line 337)
   4585 * source file name:                      nm.                  (line 135)
   4586 * source filenames for object files:     objdump.             (line 189)
   4587 * stab:                                  objdump.             (line 373)
   4588 * start-address:                         objdump.             (line 383)
   4589 * stop-address:                          objdump.             (line 387)
   4590 * strings:                               strings.             (line   6)
   4591 * strings, printing:                     strings.             (line   6)
   4592 * strip:                                 strip.               (line   6)
   4593 * Strip absolute paths:                  objdump.             (line 344)
   4594 * symbol index <1>:                      ranlib.              (line   6)
   4595 * symbol index:                          ar.                  (line  28)
   4596 * symbol index, listing:                 nm.                  (line 214)
   4597 * symbol line numbers:                   nm.                  (line 182)
   4598 * symbol table entries, printing:        objdump.             (line 392)
   4599 * symbols:                               nm.                  (line   6)
   4600 * symbols, discarding:                   strip.               (line   6)
   4601 * thin archives:                         ar.                  (line  40)
   4602 * undefined symbols:                     nm.                  (line 249)
   4603 * Unix compatibility, ar:                ar cmdline.          (line   8)
   4604 * unwind information:                    readelf.             (line 104)
   4605 * Update ELF header:                     elfedit.             (line   6)
   4606 * updating an archive:                   ar cmdline.          (line 201)
   4607 * version:                               Top.                 (line   6)
   4608 * VMA in objdump:                        objdump.             (line  71)
   4609 * wide output, printing:                 objdump.             (line 498)
   4610 * writing archive index:                 ar cmdline.          (line 183)
   4611 
   4612 
   4613 
   4614 Tag Table:
   4615 Node: Top2071
   4616 Node: ar3781
   4617 Node: ar cmdline6586
   4618 Node: ar scripts15910
   4619 Node: nm21598
   4620 Node: objcopy31072
   4621 Node: objdump60680
   4622 Node: ranlib81352
   4623 Node: size82173
   4624 Node: strings85178
   4625 Node: strip87636
   4626 Node: c++filt93587
   4627 Ref: c++filt-Footnote-198434
   4628 Node: addr2line98540
   4629 Node: nlmconv102340
   4630 Node: windmc104946
   4631 Node: windres108595
   4632 Node: dlltool114622
   4633 Node: def file format127508
   4634 Node: readelf129439
   4635 Node: elfedit136019
   4636 Node: Common Options138239
   4637 Node: Selecting the Target System139279
   4638 Node: Target Selection140211
   4639 Node: Architecture Selection142193
   4640 Node: Reporting Bugs143021
   4641 Node: Bug Criteria143800
   4642 Node: Bug Reporting144353
   4643 Node: GNU Free Documentation License151223
   4644 Node: Binutils Index176402
   4645 
   4646 End Tag Table
   4647