|
|
coherent
ar Command ar The librarian/archiver aarr _o_p_t_i_o_n [_m_o_d_i_f_i_e_r][_p_o_s_i_t_i_o_n] _a_r_c_h_i_v_e [_m_e_m_b_e_r ...] The librarian ar edits and examines libraries. It combines several files into a file called an archive or library. Archives reduce the size of directories and allow many files to be handled as a single unit. The principal use of archives is for libraries of object files. The linker ld understands the archive format, and can search libraries of object files to resolve undefined references in a program. The mandatory option argument consists of one of the following command keys: dd Delete each given member from archive. The ranlib header is updated if present. mm Move each given member within archive. If no modifier is given, move each member to the end. The ranlib header is modified if present. pp Print each member. This is useful only with archives of text files. qq Quick append: append each member to the end of archive uncon- ditionally. The ranlib header is not updated. rr Replace each member of archive. If archive does not exist, create it. The optional modifier specifies how to perform the replacement, as described below. The ranlib header is modified if present. tt Print a table of contents that lists each member specified. If none is given, list all in archive. The modifier v tells ar to give you additional information. xx Extract each given member and place it into the current direc- tory. If none is specified, extract all members. archive is not changed. The modifier may be one of the following. The modifiers aa, bb, ii, and uu may be used only with the m and r options. aa If member does not exist in archive, insert it after the mem- ber named by the given position. bb If member does not exist in archive, insert it before the mem- ber named by the given position. cc Suppress the message normally printed when ar creates an ar- chive. COHERENT Lexicon Page 1 ar Command ar ii If member does not exist in archive, insert it before the mem- ber named by the given position. This is the same as the b modifier, described above. kk Preserve the modify time of a file. This modifier is useful only with the r, q, and x options. ss Modify an archive's ranlib header, or create it if it does not exist. This is used only with the r, m, and d options. uu Update archive only if member is newer than the version in the archive. vv Generate verbose messages. All archives are written into a specialized file format. Each archive starts with a ``magic number'' called ARMAG, which iden- tifies the file as an archive. The members of the archive follow the magic number; each is preceded by an ar_hdr structure. For information on this structure, see ar.h. The structure is followed the data of the file, which occupy the number of bytes specified by the variable ar_size. ***** See Also ***** ar.h, commands, ld, nm, ranlib ***** Notes ***** It is recommended that each object-file library you create with ar have a name that begins with the string lib. This will allow you to call that library with the -l option to the cc command. COHERENT Lexicon Page 2
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.