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