2 ''' $RCSfile$$Revision$$Date$
5 ''' Revision 1.7 2001/03/25 20:32:25 nickc
6 ''' Automate generate on man pages
23 .ie \\n(.$>=3 .ne \\$3
39 ''' Set up \*(-- to give an unbreakable dash;
40 ''' string Tr holds user defined translation string.
41 ''' Bell System Logo is used as a dummy character.
47 .if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
48 .if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
51 ''' \*(M", \*(S", \*(N" and \*(T" are the equivalent of
52 ''' \*(L" and \*(R", except that they are used on ".xx" lines,
53 ''' such as .IP and .SH, which do another additional levels of
54 ''' double-quote interpretation
83 .\" If the F register is turned on, we'll generate
84 .\" index entries out stderr for the following things:
89 .\" X<> Xref (embedded
90 .\" Of course, you have to process the output yourself
91 .\" in some meaninful fashion.
94 .tm Index:\\$1\t\\n%\t"\\$2"
99 .TH AR.1 1 "binutils-2.11.90" "23/Mar/101" "GNU"
102 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
103 .de CQ \" put $1 in typewriter font
109 \\&\\$2 \\$3 \\$4 \\$5 \\$6 \\$7
112 .\" @(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2
113 . \" AM - accent mark definitions
115 . \" fudge factors for nroff and troff
124 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
130 . \" simple accents for nroff and troff
143 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
144 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
145 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
146 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
147 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
148 . ds ? \s-2c\h'-\w'c'u*7/10'\u\h'\*(#H'\zi\d\s+2\h'\w'c'u*8/10'
149 . ds ! \s-2\(or\s+2\h'-\w'\(or'u'\v'-.8m'.\v'.8m'
150 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
151 . ds q o\h'-\w'o'u*8/10'\s-4\v'.4m'\z\(*i\v'-.4m'\s+4\h'\w'o'u*8/10'
153 . \" troff and (daisy-wheel) nroff accents
154 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
155 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
156 .ds v \\k:\h'-(\\n(.wu*9/10-\*(#H)'\v'-\*(#V'\*(#[\s-4v\s0\v'\*(#V'\h'|\\n:u'\*(#]
157 .ds _ \\k:\h'-(\\n(.wu*9/10-\*(#H+(\*(#F*2/3))'\v'-.4m'\z\(hy\v'.4m'\h'|\\n:u'
158 .ds . \\k:\h'-(\\n(.wu*8/10)'\v'\*(#V*4/10'\z.\v'-\*(#V*4/10'\h'|\\n:u'
159 .ds 3 \*(#[\v'.2m'\s-2\&3\s0\v'-.2m'\*(#]
160 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
161 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
162 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
163 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
164 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
165 .ds ae a\h'-(\w'a'u*4/10)'e
166 .ds Ae A\h'-(\w'A'u*4/10)'E
167 .ds oe o\h'-(\w'o'u*4/10)'e
168 .ds Oe O\h'-(\w'O'u*4/10)'E
169 . \" corrections for vroff
170 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
171 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
172 . \" for low resolution devices (crt and lpr)
173 .if \n(.H>23 .if \n(.V>19 \
177 . ds v \h'-1'\o'\(aa\(ga'
193 ar \- create, modify, and extract from archives
195 ar [\-X32_64] [\-]\fIp\fR[\fImod\fR [\fIrelpos\fR] [\fIcount\fR]] \fIarchive\fR [\fImember\fR...]
197 The GNU \f(CWar\fR program creates, modifies, and extracts from
198 archives. An \fIarchive\fR is a single file holding a collection of
199 other files in a structure that makes it possible to retrieve
200 the original individual files (called \fImembers\fR of the archive).
202 The original files\*(R' contents, mode (permissions), timestamp, owner, and
203 group are preserved in the archive, and can be restored on
206 GNU \f(CWar\fR can maintain archives whose members have names of any
207 length; however, depending on how \f(CWar\fR is configured on your
208 system, a limit on member-name length may be imposed for compatibility
209 with archive formats maintained with other tools. If it exists, the
210 limit is often 15 characters (typical of formats related to a.out) or 16
211 characters (typical of formats related to coff).
213 \f(CWar\fR is considered a binary utility because archives of this sort
214 are most often used as \fIlibraries\fR holding commonly needed
217 \f(CWar\fR creates an index to the symbols defined in relocatable
218 object modules in the archive when you specify the modifier \fBs\fR.
219 Once created, this index is updated in the archive whenever \f(CWar\fR
220 makes a change to its contents (save for the \fBq\fR update operation).
221 An archive with such an index speeds up linking to the library, and
222 allows routines in the library to call each other without regard to
223 their placement in the archive.
225 You may use \fBnm \-s\fR or \fBnm --print-armap\fR to list this index
226 table. If an archive lacks the table, another form of \f(CWar\fR called
227 \f(CWranlib\fR can be used to add just the table.
229 GNU \f(CWar\fR is designed to be compatible with two different
230 facilities. You can control its activity using command-line options,
231 like the different varieties of \f(CWar\fR on Unix systems; or, if you
232 specify the single command-line option \fB\-M\fR, you can control it
233 with a script supplied via standard input, like the MRI ``librarian'\*(R'
236 GNU \f(CWar\fR allows you to mix the operation code \fIp\fR and modifier
237 flags \fImod\fR in any order, within the first command-line argument.
239 If you wish, you may begin the first command-line argument with a
242 The \fIp\fR keyletter specifies what operation to execute; it may be
243 any of the following, but you must specify only one of them:
245 \fIDelete\fR modules from the archive. Specify the names of modules to
246 be deleted as \fImember\fR...; the archive is untouched if you
247 specify no files to delete.
249 If you specify the \fBv\fR modifier, \f(CWar\fR lists each module
252 Use this operation to \fImove\fR members in an archive.
254 The ordering of members in an archive can make a difference in how
255 programs are linked using the library, if a symbol is defined in more
258 If no modifiers are used with \f(CWm\fR, any members you name in the
259 \fImember\fR arguments are moved to the \fIend\fR of the archive;
260 you can use the \fBa\fR, \fBb\fR, or \fBi\fR modifiers to move them to a
261 specified place instead.
263 \fIPrint\fR the specified members of the archive, to the standard
264 output file. If the \fBv\fR modifier is specified, show the member
265 name before copying its contents to standard output.
267 If you specify no \fImember\fR arguments, all the files in the archive are
270 \fIQuick append\fR; Historically, add the files \fImember\fR... to the end of
271 \fIarchive\fR, without checking for replacement.
273 The modifiers \fBa\fR, \fBb\fR, and \fBi\fR do \fInot\fR affect this
274 operation; new members are always placed at the end of the archive.
276 The modifier \fBv\fR makes \f(CWar\fR list each file as it is appended.
278 Since the point of this operation is speed, the archive's symbol table
279 index is not updated, even if it already existed; you can use \fBar s\fR or
280 \f(CWranlib\fR explicitly to update the symbol table index.
282 However, too many different systems assume quick append rebuilds the
283 index, so \s-1GNU\s0 ar implements \f(CWq\fR as a synonym for \f(CWr\fR.
285 Insert the files \fImember\fR... into \fIarchive\fR (with
286 \fIreplacement\fR). This operation differs from \fBq\fR in that any
287 previously existing members are deleted if their names match those being
290 If one of the files named in \fImember\fR... does not exist, \f(CWar\fR
291 displays an error message, and leaves undisturbed any existing members
292 of the archive matching that name.
294 By default, new members are added at the end of the file; but you may
295 use one of the modifiers \fBa\fR, \fBb\fR, or \fBi\fR to request
296 placement relative to some existing member.
298 The modifier \fBv\fR used with this operation elicits a line of
299 output for each file inserted, along with one of the letters \fBa\fR or
300 \fBr\fR to indicate whether the file was appended (no old member
301 deleted) or replaced.
303 Display a \fItable\fR listing the contents of \fIarchive\fR, or those
304 of the files listed in \fImember\fR... that are present in the
305 archive. Normally only the member name is shown; if you also want to
306 see the modes (permissions), timestamp, owner, group, and size, you can
307 request that by also specifying the \fBv\fR modifier.
309 If you do not specify a \fImember\fR, all files in the archive
312 If there is more than one file with the same name (say, \fBfie\fR) in
313 an archive (say \fBb.a\fR), \fBar t b.a fie\fR lists only the
314 first instance; to see them all, you must ask for a complete
315 listing---in our example, \fBar t b.a\fR.
317 \fIExtract\fR members (named \fImember\fR) from the archive. You can
318 use the \fBv\fR modifier with this operation, to request that
319 \f(CWar\fR list each name as it extracts it.
321 If you do not specify a \fImember\fR, all files in the archive
324 A number of modifiers (\fImod\fR) may immediately follow the \fIp\fR
325 keyletter, to specify variations on an operation's behavior:
327 Add new files \fIafter\fR an existing member of the
328 archive. If you use the modifier \fBa\fR, the name of an existing archive
329 member must be present as the \fIrelpos\fR argument, before the
330 \fIarchive\fR specification.
332 Add new files \fIbefore\fR an existing member of the
333 archive. If you use the modifier \fBb\fR, the name of an existing archive
334 member must be present as the \fIrelpos\fR argument, before the
335 \fIarchive\fR specification. (same as \fBi\fR).
337 \fICreate\fR the archive. The specified \fIarchive\fR is always
338 created if it did not exist, when you request an update. But a warning is
339 issued unless you specify in advance that you expect to create it, by
342 Truncate names in the archive. \s-1GNU\s0 \f(CWar\fR will normally permit file
343 names of any length. This will cause it to create archives which are
344 not compatible with the native \f(CWar\fR program on some systems. If
345 this is a concern, the \fBf\fR modifier may be used to truncate file
346 names when putting them in the archive.
348 Insert new files \fIbefore\fR an existing member of the
349 archive. If you use the modifier \fBi\fR, the name of an existing archive
350 member must be present as the \fIrelpos\fR argument, before the
351 \fIarchive\fR specification. (same as \fBb\fR).
353 This modifier is accepted but not used.
355 Uses the \fIcount\fR parameter. This is used if there are multiple
356 entries in the archive with the same name. Extract or delete instance
357 \fIcount\fR of the given name from the archive.
359 Preserve the \fIoriginal\fR dates of members when extracting them. If
360 you do not specify this modifier, files extracted from the archive
361 are stamped with the time of extraction.
363 Use the full path name when matching names in the archive. \s-1GNU\s0
364 \f(CWar\fR can not create an archive with a full path name (such archives
365 are not \s-1POSIX\s0 complaint), but other archive creators can. This option
366 will cause \s-1GNU\s0 \f(CWar\fR to match file names using a complete path
367 name, which can be convenient when extracting a single file from an
368 archive created by another tool.
370 Write an object-file index into the archive, or update an existing one,
371 even if no other change is made to the archive. You may use this modifier
372 flag either with any operation, or alone. Running \fBar s\fR on an
373 archive is equivalent to running \fBranlib\fR on it.
375 Do not generate an archive symbol table. This can speed up building a
376 large library in several steps. The resulting archive can not be used
377 with the linker. In order to build a symbol table, you must omit the
378 \fBS\fR modifier on the last execution of \fBar\fR, or you must run
379 \fBranlib\fR on the archive.
381 Normally, \fBar r\fR... inserts all files
382 listed into the archive. If you would like to insert \fIonly\fR those
383 of the files you list that are newer than existing members of the same
384 names, use this modifier. The \fBu\fR modifier is allowed only for the
385 operation \fBr\fR (replace). In particular, the combination \fBqu\fR is
386 not allowed, since checking the timestamps would lose any speed
387 advantage from the operation \fBq\fR.
389 This modifier requests the \fIverbose\fR version of an operation. Many
390 operations display additional information, such as filenames processed,
391 when the modifier \fBv\fR is appended.
393 This modifier shows the version number of \f(CWar\fR.
395 \f(CWar\fR ignores an initial option spelt \f(CW-X32_64\fR, for
396 compatibility with \s-1AIX\s0. The behaviour produced by this option is the
397 default for \s-1GNU\s0 \f(CWar\fR. \f(CWar\fR does not support any of the other
398 \f(CW-X\fR options; in particular, it does not support \f(CW-X32\fR
399 which is the default for \s-1AIX\s0 \f(CWar\fR.
401 \fInm\fR\|(1), \fIranlib\fR\|(1), and the Info entries for \fIbinutils\fR.
403 Copyright (c) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
405 Permission is granted to copy, distribute and/or modify this document
406 under the terms of the GNU Free Documentation License, Version 1.1
407 or any later version published by the Free Software Foundation;
408 with no Invariant Sections, with no Front-Cover Texts, and with no
409 Back-Cover Texts. A copy of the license is included in the
410 section entitled \*(L"GNU Free Documentation License\*(R".
414 .IX Name "ar - create, modify, and extract from archives"
418 .IX Header "SYNOPSIS"
420 .IX Header "DESCRIPTION"
466 .IX Header "SEE ALSO"
468 .IX Header "COPYRIGHT"