1 .\" Copyright (c) 1991, 1992, 1993, 1995, 1998, 1999, 2000 Free Software Foundation
2 .\" See section COPYING for conditions for redistribution
3 .TH ar 1 "1999" "Free Software Foundation" "GNU Development Tools"
11 ar \- create, modify, and extract from archives.
16 .BR ar " [\|" "-" "\|]"\c
17 .I {dmpqrtx}[abcfilNoPsSuvV] \c
34 \& program creates, modifies, and extracts from
37 \& is a single file holding a collection of
38 other files in a structure that makes it possible to retrieve
39 the original individual files (called \c
43 The original files' contents, mode (permissions), timestamp, owner, and
44 group are preserved in the archive, and may be reconstituted on
49 \& can maintain archives whose members have names of any
50 length; however, depending on how \c
52 \& is configured on your
53 system, a limit on member-name length may be imposed (for compatibility
54 with archive formats maintained with other tools). If it exists, the
55 limit is often 15 characters (typical of formats related to a.out) or 16
56 characters (typical of formats related to coff).
60 \& is considered a binary utility because archives of this sort
61 are most often used as \c
63 \& holding commonly needed
68 \& will create an index to the symbols defined in relocatable
69 object modules in the archive when you specify the modifier `\|\c
72 Once created, this index is updated in the archive whenever \c
75 makes a change to its contents (save for the `\|\c
77 \|' update operation).
78 An archive with such an index speeds up linking to the library, and
79 allows routines in the library to call each other without regard to
80 their placement in the archive.
85 .B nm \-\-print\-armap\c
86 \|' to list this index
87 table. If an archive lacks the table, another form of \c
92 \& can be used to add just the table.
96 \& insists on at least two arguments to execute: one
97 keyletter specifying the \c
99 \& (optionally accompanied by other
100 keyletters specifying \c
102 \&), and the archive name to act on.
104 Most operations can also accept further \c
107 specifying particular files to operate on.
112 \& allows you to mix the operation code \c
117 \& in any order, within the first command-line argument.
119 If you wish, you may begin the first command-line argument with a
124 \& keyletter specifies what operation to execute; it may be
125 any of the following, but you must specify only one of them:
131 \& modules from the archive. Specify the names of modules to
134 \&; the archive is untouched if you
135 specify no files to delete.
137 If you specify the `\|\c
141 \& will list each module
146 Use this operation to \c
148 \& members in an archive.
150 The ordering of members in an archive can make a difference in how
151 programs are linked using the library, if a symbol is defined in more
154 If no modifiers are used with \c
156 \&, any members you name in the
159 \& arguments are moved to the \c
162 you can use the `\|\c
168 \|' modifiers to move them to a
169 specified place instead.
175 \& the specified members of the archive, to the standard
176 output file. If the `\|\c
178 \|' modifier is specified, show the member
179 name before copying its contents to standard output.
183 \&, all the files in the archive are printed.
194 without checking for replacement.
205 operation; new members are always placed at the end of the archive.
211 \& list each file as it is appended.
213 Since the point of this operation is speed, the archive's symbol table
214 index is not updated, even if it already existed; you can use `\|\c
219 \& explicitly to update the symbol table index.
221 However, too many different systems assume quick append rebuilds the
226 \|' as a synonym for `\|\c
239 operation differs from `\|\c
241 \|' in that any previously existing members
242 are deleted if their names match those being added.
244 If one of the files named in \c
249 displays an error message, and leaves undisturbed any existing members
250 of the archive matching that name.
252 By default, new members are added at the end of the file; but you may
253 use one of the modifiers `\|\c
260 placement relative to some existing member.
264 \|' used with this operation elicits a line of
265 output for each file inserted, along with one of the letters `\|\c
270 \|' to indicate whether the file was appended (no old member
271 deleted) or replaced.
277 \& listing the contents of \c
280 of the files listed in \c
282 \& that are present in the
283 archive. Normally only the member name is shown; if you also want to
284 see the modes (permissions), timestamp, owner, group, and size, you can
285 request that by also specifying the `\|\c
289 If you do not specify any \c
291 \&, all files in the archive
294 If there is more than one file with the same name (say, `\|\c
297 an archive (say `\|\c
301 \|' will list only the
302 first instance; to see them all, you must ask for a complete
303 listing\(em\&in our example, `\|\c
313 \&) from the archive. You can
316 \|' modifier with this operation, to request that
319 \& list each name as it extracts it.
321 If you do not specify any \c
323 \&, all files in the archive
328 A number of modifiers (\c
330 \&) may immediately follow the \c
333 keyletter, to specify variations on an operation's behavior:
339 \& an existing member of the
340 archive. If you use the modifier \c
342 \&, the name of an existing archive
343 member must be present as the \c
345 \& argument, before the
354 \& an existing member of the
355 archive. If you use the modifier \c
357 \&, the name of an existing archive
358 member must be present as the \c
360 \& argument, before the
363 \& specification. (same as `\|\c
371 \& the archive. The specified \c
374 created if it didn't exist, when you request an update. But a warning is
375 issued unless you specify in advance that you expect to create it, by
380 Truncate names in the archive.
382 will normally permit file names of any length. This will cause it to
383 create archives which are not compatible with the native
385 program on some systems. If this is a concern, the
387 modifier may be used to truncate file names when putting them in the
394 \& an existing member of the
395 archive. If you use the modifier \c
397 \&, the name of an existing archive
398 member must be present as the \c
400 \& argument, before the
403 \& specification. (same as `\|\c
409 This modifier is accepted but not used.
415 parameter. This is used if there are multiple entries in the archive
416 with the same name. Extract or delete instance
418 of the given name from the archive.
424 \& dates of members when extracting them. If
425 you do not specify this modifier, files extracted from the archive
426 will be stamped with the time of extraction.
430 Use the full path name when matching names in the archive.
432 can not create an archive with a full path name (such archives are not
433 POSIX complaint), but other archive creators can. This option will
436 to match file names using a complete path name, which can be
437 convenient when extracting a single file from an archive created by
442 Write an object-file index into the archive, or update an existing one,
443 even if no other change is made to the archive. You may use this modifier
444 flag either with any operation, or alone. Running `\|\c
447 archive is equivalent to running `\|\c
453 Do not generate an archive symbol table. This can speed up building a
454 large library in several steps. The resulting archive can not be used
455 with the linker. In order to build a symbol table, you must omit the
458 \|' modifier on the last execution of `\|\c
460 \|', or you must run `\|\c
468 \&.\|.\|. inserts all files
469 listed into the archive. If you would like to insert \c
472 of the files you list that are newer than existing members of the same
473 names, use this modifier. The `\|\c
475 \|' modifier is allowed only for the
478 \|' (replace). In particular, the combination `\|\c
481 not allowed, since checking the timestamps would lose any speed
482 advantage from the operation `\|\c
488 This modifier requests the \c
490 \& version of an operation. Many
491 operations display additional information, such as filenames processed,
492 when the modifier `\|\c
498 This modifier shows the version number of
504 .RB "`\|" binutils "\|'"
510 The GNU Binary Utilities\c
511 , Roland H. Pesch (October 1991).
518 Copyright (c) 1991, 1992, 1993, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
520 This document is distributed under the terms of the GNU Free
521 Documentation License, version 1.1. That license is described in the
522 sources for this manual page, but it is not displayed here in order to
523 make this manual more consise. Copies of this license can also be
524 obtained from: http://www.gnu.org/copyleft/.
526 \" .SH GNU Free Documentation License
527 \" Version 1.1, March 2000
529 \" Copyright (C) 2000 Free Software Foundation, Inc.
530 \" 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
532 \" Everyone is permitted to copy and distribute verbatim
533 \" copies of this license document, but changing it is
538 \" The purpose of this License is to make a manual, textbook, or other
539 \" written document "free" in the sense of freedom: to assure everyone
540 \" the effective freedom to copy and redistribute it, with or without
541 \" modifying it, either commercially or noncommercially. Secondarily,
542 \" this License preserves for the author and publisher a way to get
543 \" credit for their work, while not being considered responsible for
544 \" modifications made by others.
546 \" This License is a kind of "copyleft", which means that derivative
547 \" works of the document must themselves be free in the same sense. It
548 \" complements the GNU General Public License, which is a copyleft
549 \" license designed for free software.
551 \" We have designed this License in order to use it for manuals for free
552 \" software, because free software needs free documentation: a free
553 \" program should come with manuals providing the same freedoms that the
554 \" software does. But this License is not limited to software manuals;
555 \" it can be used for any textual work, regardless of subject matter or
556 \" whether it is published as a printed book. We recommend this License
557 \" principally for works whose purpose is instruction or reference.
559 \" 1. APPLICABILITY AND DEFINITIONS
561 \" This License applies to any manual or other work that contains a
562 \" notice placed by the copyright holder saying it can be distributed
563 \" under the terms of this License. The "Document", below, refers to any
564 \" such manual or work. Any member of the public is a licensee, and is
565 \" addressed as "you".
567 \" A "Modified Version" of the Document means any work containing the
568 \" Document or a portion of it, either copied verbatim, or with
569 \" modifications and/or translated into another language.
571 \" A "Secondary Section" is a named appendix or a front-matter section of
572 \" the Document that deals exclusively with the relationship of the
573 \" publishers or authors of the Document to the Document's overall subject
574 \" (or to related matters) and contains nothing that could fall directly
575 \" within that overall subject. (For example, if the Document is in part a
576 \" textbook of mathematics, a Secondary Section may not explain any
577 \" mathematics.) The relationship could be a matter of historical
578 \" connection with the subject or with related matters, or of legal,
579 \" commercial, philosophical, ethical or political position regarding
582 \" The "Invariant Sections" are certain Secondary Sections whose titles
583 \" are designated, as being those of Invariant Sections, in the notice
584 \" that says that the Document is released under this License.
586 \" The "Cover Texts" are certain short passages of text that are listed,
587 \" as Front-Cover Texts or Back-Cover Texts, in the notice that says that
588 \" the Document is released under this License.
590 \" A "Transparent" copy of the Document means a machine-readable copy,
591 \" represented in a format whose specification is available to the
592 \" general public, whose contents can be viewed and edited directly and
593 \" straightforwardly with generic text editors or (for images composed of
594 \" pixels) generic paint programs or (for drawings) some widely available
595 \" drawing editor, and that is suitable for input to text formatters or
596 \" for automatic translation to a variety of formats suitable for input
597 \" to text formatters. A copy made in an otherwise Transparent file
598 \" format whose markup has been designed to thwart or discourage
599 \" subsequent modification by readers is not Transparent. A copy that is
600 \" not "Transparent" is called "Opaque".
602 \" Examples of suitable formats for Transparent copies include plain
603 \" ASCII without markup, Texinfo input format, LaTeX input format, SGML
604 \" or XML using a publicly available DTD, and standard-conforming simple
605 \" HTML designed for human modification. Opaque formats include
606 \" PostScript, PDF, proprietary formats that can be read and edited only
607 \" by proprietary word processors, SGML or XML for which the DTD and/or
608 \" processing tools are not generally available, and the
609 \" machine-generated HTML produced by some word processors for output
612 \" The "Title Page" means, for a printed book, the title page itself,
613 \" plus such following pages as are needed to hold, legibly, the material
614 \" this License requires to appear in the title page. For works in
615 \" formats which do not have any title page as such, "Title Page" means
616 \" the text near the most prominent appearance of the work's title,
617 \" preceding the beginning of the body of the text.
619 \" 2. VERBATIM COPYING
621 \" You may copy and distribute the Document in any medium, either
622 \" commercially or noncommercially, provided that this License, the
623 \" copyright notices, and the license notice saying this License applies
624 \" to the Document are reproduced in all copies, and that you add no other
625 \" conditions whatsoever to those of this License. You may not use
626 \" technical measures to obstruct or control the reading or further
627 \" copying of the copies you make or distribute. However, you may accept
628 \" compensation in exchange for copies. If you distribute a large enough
629 \" number of copies you must also follow the conditions in section 3.
631 \" You may also lend copies, under the same conditions stated above, and
632 \" you may publicly display copies.
634 \" 3. COPYING IN QUANTITY
636 \" If you publish printed copies of the Document numbering more than 100,
637 \" and the Document's license notice requires Cover Texts, you must enclose
638 \" the copies in covers that carry, clearly and legibly, all these Cover
639 \" Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
640 \" the back cover. Both covers must also clearly and legibly identify
641 \" you as the publisher of these copies. The front cover must present
642 \" the full title with all words of the title equally prominent and
643 \" visible. You may add other material on the covers in addition.
644 \" Copying with changes limited to the covers, as long as they preserve
645 \" the title of the Document and satisfy these conditions, can be treated
646 \" as verbatim copying in other respects.
648 \" If the required texts for either cover are too voluminous to fit
649 \" legibly, you should put the first ones listed (as many as fit
650 \" reasonably) on the actual cover, and continue the rest onto adjacent
653 \" If you publish or distribute Opaque copies of the Document numbering
654 \" more than 100, you must either include a machine-readable Transparent
655 \" copy along with each Opaque copy, or state in or with each Opaque copy
656 \" a publicly-accessible computer-network location containing a complete
657 \" Transparent copy of the Document, free of added material, which the
658 \" general network-using public has access to download anonymously at no
659 \" charge using public-standard network protocols. If you use the latter
660 \" option, you must take reasonably prudent steps, when you begin
661 \" distribution of Opaque copies in quantity, to ensure that this
662 \" Transparent copy will remain thus accessible at the stated location
663 \" until at least one year after the last time you distribute an Opaque
664 \" copy (directly or through your agents or retailers) of that edition to
667 \" It is requested, but not required, that you contact the authors of the
668 \" Document well before redistributing any large number of copies, to give
669 \" them a chance to provide you with an updated version of the Document.
673 \" You may copy and distribute a Modified Version of the Document under
674 \" the conditions of sections 2 and 3 above, provided that you release
675 \" the Modified Version under precisely this License, with the Modified
676 \" Version filling the role of the Document, thus licensing distribution
677 \" and modification of the Modified Version to whoever possesses a copy
678 \" of it. In addition, you must do these things in the Modified Version:
680 \" A. Use in the Title Page (and on the covers, if any) a title distinct
681 \" from that of the Document, and from those of previous versions
682 \" (which should, if there were any, be listed in the History section
683 \" of the Document). You may use the same title as a previous version
684 \" if the original publisher of that version gives permission.
686 \" B. List on the Title Page, as authors, one or more persons or entities
687 \" responsible for authorship of the modifications in the Modified
688 \" Version, together with at least five of the principal authors of the
689 \" Document (all of its principal authors, if it has less than five).
691 \" C. State on the Title page the name of the publisher of the
692 \" Modified Version, as the publisher.
694 \" D. Preserve all the copyright notices of the Document.
696 \" E. Add an appropriate copyright notice for your modifications
697 \" adjacent to the other copyright notices.
699 \" F. Include, immediately after the copyright notices, a license notice
700 \" giving the public permission to use the Modified Version under the
701 \" terms of this License, in the form shown in the Addendum below.
702 \" Preserve in that license notice the full lists of Invariant Sections
703 \" and required Cover Texts given in the Document's license notice.
705 \" H. Include an unaltered copy of this License.
707 \" I. Preserve the section entitled "History", and its title, and add to
708 \" it an item stating at least the title, year, new authors, and
709 \" publisher of the Modified Version as given on the Title Page. If
710 \" there is no section entitled "History" in the Document, create one
711 \" stating the title, year, authors, and publisher of the Document as
712 \" given on its Title Page, then add an item describing the Modified
713 \" Version as stated in the previous sentence.
715 \" J. Preserve the network location, if any, given in the Document for
716 \" public access to a Transparent copy of the Document, and likewise
717 \" the network locations given in the Document for previous versions
718 \" it was based on. These may be placed in the "History" section.
719 \" You may omit a network location for a work that was published at
720 \" least four years before the Document itself, or if the original
721 \" publisher of the version it refers to gives permission.
723 \" K. In any section entitled "Acknowledgements" or "Dedications",
724 \" preserve the section's title, and preserve in the section all the
725 \" substance and tone of each of the contributor acknowledgements
726 \" and/or dedications given therein.
728 \" L. Preserve all the Invariant Sections of the Document,
729 \" unaltered in their text and in their titles. Section numbers
730 \" or the equivalent are not considered part of the section titles.
732 \" M. Delete any section entitled "Endorsements". Such a section
733 \" may not be included in the Modified Version.
735 \" N. Do not retitle any existing section as "Endorsements"
736 \" or to conflict in title with any Invariant Section.
738 \" If the Modified Version includes new front-matter sections or
739 \" appendices that qualify as Secondary Sections and contain no material
740 \" copied from the Document, you may at your option designate some or all
741 \" of these sections as invariant. To do this, add their titles to the
742 \" list of Invariant Sections in the Modified Version's license notice.
743 \" These titles must be distinct from any other section titles.
745 \" You may add a section entitled "Endorsements", provided it contains
746 \" nothing but endorsements of your Modified Version by various
747 \" parties--for example, statements of peer review or that the text has
748 \" been approved by an organization as the authoritative definition of a
751 \" You may add a passage of up to five words as a Front-Cover Text, and a
752 \" passage of up to 25 words as a Back-Cover Text, to the end of the list
753 \" of Cover Texts in the Modified Version. Only one passage of
754 \" Front-Cover Text and one of Back-Cover Text may be added by (or
755 \" through arrangements made by) any one entity. If the Document already
756 \" includes a cover text for the same cover, previously added by you or
757 \" by arrangement made by the same entity you are acting on behalf of,
758 \" you may not add another; but you may replace the old one, on explicit
759 \" permission from the previous publisher that added the old one.
761 \" The author(s) and publisher(s) of the Document do not by this License
762 \" give permission to use their names for publicity for or to assert or
763 \" imply endorsement of any Modified Version.
766 \" 5. COMBINING DOCUMENTS
768 \" You may combine the Document with other documents released under this
769 \" License, under the terms defined in section 4 above for modified
770 \" versions, provided that you include in the combination all of the
771 \" Invariant Sections of all of the original documents, unmodified, and
772 \" list them all as Invariant Sections of your combined work in its
775 \" The combined work need only contain one copy of this License, and
776 \" multiple identical Invariant Sections may be replaced with a single
777 \" copy. If there are multiple Invariant Sections with the same name but
778 \" different contents, make the title of each such section unique by
779 \" adding at the end of it, in parentheses, the name of the original
780 \" author or publisher of that section if known, or else a unique number.
781 \" Make the same adjustment to the section titles in the list of
782 \" Invariant Sections in the license notice of the combined work.
784 \" In the combination, you must combine any sections entitled "History"
785 \" in the various original documents, forming one section entitled
786 \" "History"; likewise combine any sections entitled "Acknowledgements",
787 \" and any sections entitled "Dedications". You must delete all sections
788 \" entitled "Endorsements."
791 \" 6. COLLECTIONS OF DOCUMENTS
793 \" You may make a collection consisting of the Document and other documents
794 \" released under this License, and replace the individual copies of this
795 \" License in the various documents with a single copy that is included in
796 \" the collection, provided that you follow the rules of this License for
797 \" verbatim copying of each of the documents in all other respects.
799 \" You may extract a single document from such a collection, and distribute
800 \" it individually under this License, provided you insert a copy of this
801 \" License into the extracted document, and follow this License in all
802 \" other respects regarding verbatim copying of that document.
805 \" 7. AGGREGATION WITH INDEPENDENT WORKS
807 \" A compilation of the Document or its derivatives with other separate
808 \" and independent documents or works, in or on a volume of a storage or
809 \" distribution medium, does not as a whole count as a Modified Version
810 \" of the Document, provided no compilation copyright is claimed for the
811 \" compilation. Such a compilation is called an "aggregate", and this
812 \" License does not apply to the other self-contained works thus compiled
813 \" with the Document, on account of their being thus compiled, if they
814 \" are not themselves derivative works of the Document.
816 \" If the Cover Text requirement of section 3 is applicable to these
817 \" copies of the Document, then if the Document is less than one quarter
818 \" of the entire aggregate, the Document's Cover Texts may be placed on
819 \" covers that surround only the Document within the aggregate.
820 \" Otherwise they must appear on covers around the whole aggregate.
825 \" Translation is considered a kind of modification, so you may
826 \" distribute translations of the Document under the terms of section 4.
827 \" Replacing Invariant Sections with translations requires special
828 \" permission from their copyright holders, but you may include
829 \" translations of some or all Invariant Sections in addition to the
830 \" original versions of these Invariant Sections. You may include a
831 \" translation of this License provided that you also include the
832 \" original English version of this License. In case of a disagreement
833 \" between the translation and the original English version of this
834 \" License, the original English version will prevail.
839 \" You may not copy, modify, sublicense, or distribute the Document except
840 \" as expressly provided for under this License. Any other attempt to
841 \" copy, modify, sublicense or distribute the Document is void, and will
842 \" automatically terminate your rights under this License. However,
843 \" parties who have received copies, or rights, from you under this
844 \" License will not have their licenses terminated so long as such
845 \" parties remain in full compliance.
848 \" 10. FUTURE REVISIONS OF THIS LICENSE
850 \" The Free Software Foundation may publish new, revised versions
851 \" of the GNU Free Documentation License from time to time. Such new
852 \" versions will be similar in spirit to the present version, but may
853 \" differ in detail to address new problems or concerns. See
854 \" http://www.gnu.org/copyleft/.
856 \" Each version of the License is given a distinguishing version number.
857 \" If the Document specifies that a particular numbered version of this
858 \" License "or any later version" applies to it, you have the option of
859 \" following the terms and conditions either of that specified version or
860 \" of any later version that has been published (not as a draft) by the
861 \" Free Software Foundation. If the Document does not specify a version
862 \" number of this License, you may choose any version ever published (not
863 \" as a draft) by the Free Software Foundation.
866 \" ADDENDUM: How to use this License for your documents
868 \" To use this License in a document you have written, include a copy of
869 \" the License in the document and put the following copyright and
870 \" license notices just after the title page:
872 \" Copyright (c) YEAR YOUR NAME.
873 \" Permission is granted to copy, distribute and/or
874 \" modify this document under the terms of the GNU
875 \" Free Documentation License, Version 1.1 or any later
876 \" version published by the Free Software Foundation;
877 \" with the Invariant Sections being LIST THEIR TITLES,
878 \" with the Front-Cover Texts being LIST, and with the
879 \" Back-Cover Texts being LIST. A copy of the license
880 \" is included in the section entitled "GNU Free
881 \" Documentation License".
883 \" If you have no Invariant Sections, write "with no Invariant Sections"
884 \" instead of saying which ones are invariant. If you have no
885 \" Front-Cover Texts, write "no Front-Cover Texts" instead of
886 \" "Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
888 \" If your document contains nontrivial examples of program code, we
889 \" recommend releasing these examples in parallel under your choice of
890 \" free software license, such as the GNU General Public License,
891 \" to permit their use in free software.