neingeist
/
arduinisten
Archived
1
0
Fork 0
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

111 lines
5.8 KiB
HTML

<html lang="en">
<head>
<title>ar - GNU Binary Utilities</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="GNU Binary Utilities">
<meta name="generator" content="makeinfo 4.7">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="index.html#Top" title="Top">
<link rel="next" href="nm.html#nm" title="nm">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, with no Front-Cover Texts, and with no
Back-Cover Texts. A copy of the license is included in the
section entitled ``GNU Free Documentation License''.
man end-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family: serif; font-weight: normal; }
--></style>
</head>
<body>
<div class="node">
<p>
<a name="ar"></a>Next:&nbsp;<a rel="next" accesskey="n" href="nm.html#nm">nm</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="index.html#Top">Top</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr><br>
</div>
<h2 class="chapter">1 ar</h2>
<p><a name="index-ar-2"></a><a name="index-archives-3"></a><a name="index-collections-of-files-4"></a>
<!-- man title ar create, modify, and extract from archives -->
<pre class="smallexample"> ar [-]<var>p</var>[<var>mod</var> [<var>relpos</var>] [<var>count</var>]] <var>archive</var> [<var>member</var>...]
ar -M [ &lt;mri-script ]
</pre>
<!-- man begin DESCRIPTION ar -->
<p>The <span class="sc">gnu</span> <span class="command">ar</span> program creates, modifies, and extracts from
archives. An <dfn>archive</dfn> is a single file holding a collection of
other files in a structure that makes it possible to retrieve
the original individual files (called <dfn>members</dfn> of the archive).
<p>The original files' contents, mode (permissions), timestamp, owner, and
group are preserved in the archive, and can be restored on
extraction.
<p><a name="index-name-length-5"></a><span class="sc">gnu</span> <span class="command">ar</span> can maintain archives whose members have names of any
length; however, depending on how <span class="command">ar</span> is configured on your
system, a limit on member-name length may be imposed for compatibility
with archive formats maintained with other tools. If it exists, the
limit is often 15 characters (typical of formats related to a.out) or 16
characters (typical of formats related to coff).
<p><a name="index-libraries-6"></a><span class="command">ar</span> is considered a binary utility because archives of this sort
are most often used as <dfn>libraries</dfn> holding commonly needed
subroutines.
<p><a name="index-symbol-index-7"></a><span class="command">ar</span> creates an index to the symbols defined in relocatable
object modules in the archive when you specify the modifier <span class="samp">s</span>.
Once created, this index is updated in the archive whenever <span class="command">ar</span>
makes a change to its contents (save for the <span class="samp">q</span> update operation).
An archive with such an index speeds up linking to the library, and
allows routines in the library to call each other without regard to
their placement in the archive.
<p>You may use <span class="samp">nm -s</span> or <span class="samp">nm --print-armap</span> to list this index
table. If an archive lacks the table, another form of <span class="command">ar</span> called
<span class="command">ranlib</span> can be used to add just the table.
<p><a name="index-thin-archives-8"></a><span class="sc">gnu</span> <span class="command">ar</span> can optionally create a <em>thin</em> archive,
which contains a symbol index and references to the original copies
of the member files of the archives. Such an archive is useful
for building libraries for use within a local build, where the
relocatable objects are expected to remain available, and copying the
contents of each object would only waste time and space. Thin archives
are also <em>flattened</em>, so that adding one or more archives to a
thin archive will add the elements of the nested archive individually.
The paths to the elements of the archive are stored relative to the
archive itself.
<p><a name="index-compatibility_002c-_0040command_007bar_007d-9"></a><a name="index-_0040command_007bar_007d-compatibility-10"></a><span class="sc">gnu</span> <span class="command">ar</span> is designed to be compatible with two different
facilities. You can control its activity using command-line options,
like the different varieties of <span class="command">ar</span> on Unix systems; or, if you
specify the single command-line option <span class="option">-M</span>, you can control it
with a script supplied via standard input, like the MRI &ldquo;librarian&rdquo;
program.
<!-- man end -->
<ul class="menu">
<li><a accesskey="1" href="ar-cmdline.html#ar-cmdline">ar cmdline</a>: Controlling <span class="command">ar</span> on the command line
<li><a accesskey="2" href="ar-scripts.html#ar-scripts">ar scripts</a>: Controlling <span class="command">ar</span> with a script
</ul>
</body></html>