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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.20.1/] [binutils/] [doc/] [binutils.info] - Blame information for rev 304

Go to most recent revision | Details | Compare with Previous | View Log

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

41
File: binutils.info,  Node: Top,  Next: ar,  Up: (dir)
42
 
43
Introduction
44
************
45
 
46
This brief manual contains documentation for the GNU binary utilities
47
(GNU Binutils) version 2.20:
48
 
49
   This document is distributed under the terms of the GNU Free
50
Documentation License version 1.3.  A copy of the license is included
51
in the section entitled "GNU Free Documentation License".
52
 
53
* Menu:
54
 
55
* ar::                          Create, modify, and extract from archives
56
* nm::                          List symbols from object files
57
* objcopy::                     Copy and translate object files
58
* objdump::                     Display information from object files
59
* ranlib::                      Generate index to archive contents
60
* readelf::                     Display the contents of ELF format files
61
* size::                        List section sizes and total size
62
* strings::                     List printable strings from files
63
* strip::                       Discard symbols
64
* c++filt::                     Filter to demangle encoded C++ symbols
65
* cxxfilt: c++filt.             MS-DOS name for c++filt
66
* addr2line::                   Convert addresses to file and line
67
* nlmconv::                     Converts object code into an NLM
68
* windres::                     Manipulate Windows resources
69
* windmc::                      Generator for Windows message resources
70
* dlltool::                     Create files needed to build and use DLLs
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

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

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

361
File: binutils.info,  Node: ar scripts,  Prev: ar cmdline,  Up: ar
362
 
363
1.2 Controlling `ar' with a Script
364
==================================
365
 
366
     ar -M [ 



powered by: WebSVN 2.1.0

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