OpenCores
URL https://opencores.org/ocsvn/altor32/altor32/trunk

Subversion Repositories altor32

[/] [altor32/] [trunk/] [gcc-x64/] [or1knd-elf/] [share/] [info/] [binutils.info] - Blame information for rev 35

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 35 ultra_embe
This is binutils.info, produced by makeinfo version 4.13 from
2
binutils.texi.
3
 
4
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
5
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
6
2012 Free Software Foundation, Inc.
7
 
8
   Permission is granted to copy, distribute and/or modify this document
9
under the terms of the GNU Free Documentation License, Version 1.3 or
10
any later version published by the Free Software Foundation; with no
11
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
12
Texts.  A copy of the license is included in the section entitled "GNU
13
Free Documentation License".
14
 
15
INFO-DIR-SECTION Software development
16
START-INFO-DIR-ENTRY
17
* Binutils: (binutils).         The GNU binary utilities.
18
END-INFO-DIR-ENTRY
19
 
20
INFO-DIR-SECTION Individual utilities
21
START-INFO-DIR-ENTRY
22
* addr2line: (binutils)addr2line. Convert addresses to file and line.
23
* ar: (binutils)ar.               Create, modify, and extract from archives.
24
* c++filt: (binutils)c++filt.     Filter to demangle encoded C++ symbols.
25
* cxxfilt: (binutils)c++filt.     MS-DOS name for c++filt.
26
* dlltool: (binutils)dlltool.     Create files needed to build and use DLLs.
27
* nlmconv: (binutils)nlmconv.     Converts object code into an NLM.
28
* nm: (binutils)nm.               List symbols from object files.
29
* objcopy: (binutils)objcopy.     Copy and translate object files.
30
* objdump: (binutils)objdump.     Display information from object files.
31
* ranlib: (binutils)ranlib.       Generate index to archive contents.
32
* readelf: (binutils)readelf.     Display the contents of ELF format files.
33
* size: (binutils)size.           List section sizes and total size.
34
* strings: (binutils)strings.     List printable strings from files.
35
* strip: (binutils)strip.         Discard symbols.
36
* elfedit: (binutils)elfedit.     Update the ELF header of ELF files.
37
* windmc: (binutils)windmc.       Generator for Windows message resources.
38
* windres: (binutils)windres.     Manipulate Windows resources.
39
END-INFO-DIR-ENTRY
40
 
41

42
File: binutils.info,  Node: Top,  Next: ar,  Up: (dir)
43
 
44
Introduction
45
************
46
 
47
This brief manual contains documentation for the GNU binary utilities
48
(GNU Binutils) version 2.23.51:
49
 
50
   This document is distributed under the terms of the GNU Free
51
Documentation License version 1.3.  A copy of the license is included
52
in the section entitled "GNU Free Documentation License".
53
 
54
* Menu:
55
 
56
* ar::                          Create, modify, and extract from archives
57
* nm::                          List symbols from object files
58
* objcopy::                     Copy and translate object files
59
* objdump::                     Display information from object files
60
* ranlib::                      Generate index to archive contents
61
* readelf::                     Display the contents of ELF format files
62
* size::                        List section sizes and total size
63
* strings::                     List printable strings from files
64
* strip::                       Discard symbols
65
* elfedit::                     Update the ELF header of ELF files
66
* c++filt::                     Filter to demangle encoded C++ symbols
67
* cxxfilt: c++filt.             MS-DOS name for c++filt
68
* addr2line::                   Convert addresses to file and line
69
* nlmconv::                     Converts object code into an NLM
70
* windres::                     Manipulate Windows resources
71
* windmc::                      Generator for Windows message resources
72
* dlltool::                     Create files needed to build and use DLLs
73
* Common Options::              Command-line options for all utilities
74
* Selecting the Target System:: How these utilities determine the target
75
* Reporting Bugs::              Reporting Bugs
76
* GNU Free Documentation License::  GNU Free Documentation License
77
* Binutils Index::              Binutils Index
78
 
79

80
File: binutils.info,  Node: ar,  Next: nm,  Prev: Top,  Up: Top
81
 
82
1 ar
83
****
84
 
85
     ar [`--plugin' NAME] [-]P[MOD [RELPOS] [COUNT]] [`--target' BFDNAME] ARCHIVE [MEMBER...]
86
     ar -M [ 
87
 
88
   The GNU `ar' program creates, modifies, and extracts from archives.
89
An "archive" is a single file holding a collection of other files in a
90
structure that makes it possible to retrieve the original individual
91
files (called "members" of the archive).
92
 
93
   The original files' contents, mode (permissions), timestamp, owner,
94
and group are preserved in the archive, and can be restored on
95
extraction.
96
 
97
   GNU `ar' can maintain archives whose members have names of any
98
length; however, depending on how `ar' is configured on your system, a
99
limit on member-name length may be imposed for compatibility with
100
archive formats maintained with other tools.  If it exists, the limit
101
is often 15 characters (typical of formats related to a.out) or 16
102
characters (typical of formats related to coff).
103
 
104
   `ar' is considered a binary utility because archives of this sort
105
are most often used as "libraries" holding commonly needed subroutines.
106
 
107
   `ar' creates an index to the symbols defined in relocatable object
108
modules in the archive when you specify the modifier `s'.  Once
109
created, this index is updated in the archive whenever `ar' makes a
110
change to its contents (save for the `q' update operation).  An archive
111
with such an index speeds up linking to the library, and allows
112
routines in the library to call each other without regard to their
113
placement in the archive.
114
 
115
   You may use `nm -s' or `nm --print-armap' to list this index table.
116
If an archive lacks the table, another form of `ar' called `ranlib' can
117
be used to add just the table.
118
 
119
   GNU `ar' can optionally create a _thin_ archive, which contains a
120
symbol index and references to the original copies of the member files
121
of the archives.  Such an archive is useful for building libraries for
122
use within a local build, where the relocatable objects are expected to
123
remain available, and copying the contents of each object would only
124
waste time and space.  Thin archives are also _flattened_, so that
125
adding one or more archives to a thin archive will add the elements of
126
the nested archive individually.  The paths to the elements of the
127
archive are stored relative to the archive itself.
128
 
129
   GNU `ar' is designed to be compatible with two different facilities.
130
You can control its activity using command-line options, like the
131
different varieties of `ar' on Unix systems; or, if you specify the
132
single command-line option `-M', you can control it with a script
133
supplied via standard input, like the MRI "librarian" program.
134
 
135
* Menu:
136
 
137
* ar cmdline::                  Controlling `ar' on the command line
138
* ar scripts::                  Controlling `ar' with a script
139
 
140

141
File: binutils.info,  Node: ar cmdline,  Next: ar scripts,  Up: ar
142
 
143
1.1 Controlling `ar' on the Command Line
144
========================================
145
 
146
     ar [`--plugin' NAME] [`-X32_64'] [`-']P[MOD [RELPOS] [COUNT]] [`--target' BFDNAME] ARCHIVE [MEMBER...]
147
 
148
   When you use `ar' in the Unix style, `ar' insists on at least two
149
arguments to execute: one keyletter specifying the _operation_
150
(optionally accompanied by other keyletters specifying _modifiers_),
151
and the archive name to act on.
152
 
153
   Most operations can also accept further MEMBER arguments, specifying
154
particular files to operate on.
155
 
156
   GNU `ar' allows you to mix the operation code P and modifier flags
157
MOD in any order, within the first command-line argument.
158
 
159
   If you wish, you may begin the first command-line argument with a
160
dash.
161
 
162
   The P keyletter specifies what operation to execute; it may be any
163
of the following, but you must specify only one of them:
164
 
165
`d'
166
     _Delete_ modules from the archive.  Specify the names of modules to
167
     be deleted as MEMBER...; the archive is untouched if you specify
168
     no files to delete.
169
 
170
     If you specify the `v' modifier, `ar' lists each module as it is
171
     deleted.
172
 
173
`m'
174
     Use this operation to _move_ members in an archive.
175
 
176
     The ordering of members in an archive can make a difference in how
177
     programs are linked using the library, if a symbol is defined in
178
     more than one member.
179
 
180
     If no modifiers are used with `m', any members you name in the
181
     MEMBER arguments are moved to the _end_ of the archive; you can
182
     use the `a', `b', or `i' modifiers to move them to a specified
183
     place instead.
184
 
185
`p'
186
     _Print_ the specified members of the archive, to the standard
187
     output file.  If the `v' modifier is specified, show the member
188
     name before copying its contents to standard output.
189
 
190
     If you specify no MEMBER arguments, all the files in the archive
191
     are printed.
192
 
193
`q'
194
     _Quick append_; Historically, add the files MEMBER... to the end of
195
     ARCHIVE, without checking for replacement.
196
 
197
     The modifiers `a', `b', and `i' do _not_ affect this operation;
198
     new members are always placed at the end of the archive.
199
 
200
     The modifier `v' makes `ar' list each file as it is appended.
201
 
202
     Since the point of this operation is speed, the archive's symbol
203
     table index is not updated, even if it already existed; you can
204
     use `ar s' or `ranlib' explicitly to update the symbol table index.
205
 
206
     However, too many different systems assume quick append rebuilds
207
     the index, so GNU `ar' implements `q' as a synonym for `r'.
208
 
209
`r'
210
     Insert the files MEMBER... into ARCHIVE (with _replacement_). This
211
     operation differs from `q' in that any previously existing members
212
     are deleted if their names match those being added.
213
 
214
     If one of the files named in MEMBER... does not exist, `ar'
215
     displays an error message, and leaves undisturbed any existing
216
     members of the archive matching that name.
217
 
218
     By default, new members are added at the end of the file; but you
219
     may use one of the modifiers `a', `b', or `i' to request placement
220
     relative to some existing member.
221
 
222
     The modifier `v' used with this operation elicits a line of output
223
     for each file inserted, along with one of the letters `a' or `r'
224
     to indicate whether the file was appended (no old member deleted)
225
     or replaced.
226
 
227
`s'
228
     Add an index to the archive, or update it if it already exists.
229
     Note this command is an exception to the rule that there can only
230
     be one command letter, as it is possible to use it as either a
231
     command or a modifier.  In either case it does the same thing.
232
 
233
`t'
234
     Display a _table_ listing the contents of ARCHIVE, or those of the
235
     files listed in MEMBER... that are present in the archive.
236
     Normally only the member name is shown; if you also want to see
237
     the modes (permissions), timestamp, owner, group, and size, you can
238
     request that by also specifying the `v' modifier.
239
 
240
     If you do not specify a MEMBER, all files in the archive are
241
     listed.
242
 
243
     If there is more than one file with the same name (say, `fie') in
244
     an archive (say `b.a'), `ar t b.a fie' lists only the first
245
     instance; to see them all, you must ask for a complete listing--in
246
     our example, `ar t b.a'.
247
 
248
`x'
249
     _Extract_ members (named MEMBER) from the archive.  You can use
250
     the `v' modifier with this operation, to request that `ar' list
251
     each name as it extracts it.
252
 
253
     If you do not specify a MEMBER, all files in the archive are
254
     extracted.
255
 
256
     Files cannot be extracted from a thin archive.
257
 
258
`--help'
259
     Displays the list of command line options supported by `ar' and
260
     then exits.
261
 
262
`--version'
263
     Displays the version information of `ar' and then exits.
264
 
265
 
266
   A number of modifiers (MOD) may immediately follow the P keyletter,
267
to specify variations on an operation's behavior:
268
 
269
`a'
270
     Add new files _after_ an existing member of the archive.  If you
271
     use the modifier `a', the name of an existing archive member must
272
     be present as the RELPOS argument, before the ARCHIVE
273
     specification.
274
 
275
`b'
276
     Add new files _before_ an existing member of the archive.  If you
277
     use the modifier `b', the name of an existing archive member must
278
     be present as the RELPOS argument, before the ARCHIVE
279
     specification.  (same as `i').
280
 
281
`c'
282
     _Create_ the archive.  The specified ARCHIVE is always created if
283
     it did not exist, when you request an update.  But a warning is
284
     issued unless you specify in advance that you expect to create it,
285
     by using this modifier.
286
 
287
`D'
288
     Operate in _deterministic_ mode.  When adding files and the archive
289
     index use zero for UIDs, GIDs, timestamps, and use consistent file
290
     modes for all files.  When this option is used, if `ar' is used
291
     with identical options and identical input files, multiple runs
292
     will create identical output files regardless of the input files'
293
     owners, groups, file modes, or modification times.
294
 
295
     If `binutils' was configured with
296
     `--enable-deterministic-archives', then this mode is on by default.
297
     It can be disabled with the `U' modifier, below.
298
 
299
`f'
300
     Truncate names in the archive.  GNU `ar' will normally permit file
301
     names of any length.  This will cause it to create archives which
302
     are not compatible with the native `ar' program on some systems.
303
     If this is a concern, the `f' modifier may be used to truncate file
304
     names when putting them in the archive.
305
 
306
`i'
307
     Insert new files _before_ an existing member of the archive.  If
308
     you use the modifier `i', the name of an existing archive member
309
     must be present as the RELPOS argument, before the ARCHIVE
310
     specification.  (same as `b').
311
 
312
`l'
313
     This modifier is accepted but not used.
314
 
315
`N'
316
     Uses the COUNT parameter.  This is used if there are multiple
317
     entries in the archive with the same name.  Extract or delete
318
     instance COUNT of the given name from the archive.
319
 
320
`o'
321
     Preserve the _original_ dates of members when extracting them.  If
322
     you do not specify this modifier, files extracted from the archive
323
     are stamped with the time of extraction.
324
 
325
`P'
326
     Use the full path name when matching names in the archive.  GNU
327
     `ar' can not create an archive with a full path name (such archives
328
     are not POSIX complaint), but other archive creators can.  This
329
     option will cause GNU `ar' to match file names using a complete
330
     path name, which can be convenient when extracting a single file
331
     from an archive created by another tool.
332
 
333
`s'
334
     Write an object-file index into the archive, or update an existing
335
     one, even if no other change is made to the archive.  You may use
336
     this modifier flag either with any operation, or alone.  Running
337
     `ar s' on an archive is equivalent to running `ranlib' on it.
338
 
339
`S'
340
     Do not generate an archive symbol table.  This can speed up
341
     building a large library in several steps.  The resulting archive
342
     can not be used with the linker.  In order to build a symbol
343
     table, you must omit the `S' modifier on the last execution of
344
     `ar', or you must run `ranlib' on the archive.
345
 
346
`T'
347
     Make the specified ARCHIVE a _thin_ archive.  If it already exists
348
     and is a regular archive, the existing members must be present in
349
     the same directory as ARCHIVE.
350
 
351
`u'
352
     Normally, `ar r'... inserts all files listed into the archive.  If
353
     you would like to insert _only_ those of the files you list that
354
     are newer than existing members of the same names, use this
355
     modifier.  The `u' modifier is allowed only for the operation `r'
356
     (replace).  In particular, the combination `qu' is not allowed,
357
     since checking the timestamps would lose any speed advantage from
358
     the operation `q'.
359
 
360
`U'
361
     Do _not_ operate in _deterministic_ mode.  This is the inverse of
362
     the `D' modifier, above: added files and the archive index will
363
     get their actual UID, GID, timestamp, and file mode values.
364
 
365
     This is the default unless `binutils' was configured with
366
     `--enable-deterministic-archives'.
367
 
368
`v'
369
     This modifier requests the _verbose_ version of an operation.  Many
370
     operations display additional information, such as filenames
371
     processed, when the modifier `v' is appended.
372
 
373
`V'
374
     This modifier shows the version number of `ar'.
375
 
376
   `ar' ignores an initial option spelt `-X32_64', for compatibility
377
with AIX.  The behaviour produced by this option is the default for GNU
378
`ar'.  `ar' does not support any of the other `-X' options; in
379
particular, it does not support `-X32' which is the default for AIX
380
`ar'.
381
 
382
   The optional command line switch `--plugin' NAME causes `ar' to load
383
the plugin called NAME which adds support for more file formats.  This
384
option is only available if the toolchain has been built with plugin
385
support enabled.
386
 
387
   The optional command line switch `--target' BFDNAME specifies that
388
the archive members are in an object code format different from your
389
system's default format.  See *Note Target Selection::, for more
390
information.
391
 
392

393
File: binutils.info,  Node: ar scripts,  Prev: ar cmdline,  Up: ar
394
 
395
1.2 Controlling `ar' with a Script
396
==================================
397
 
398
     ar -M [ 



powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.