Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)

User Commands (a - b) ar(1)
le obey_le, you must specify one and only one ag from the required-ag set
dmpqrtx. You can also specify any number of optional ags from the set abcil-
suvCT. If you select one of the positioning ags (a, b,ori), you must also
specify the name of a le within the library (position_name) immediately follow-
ing the ag list and separated from it by a space.
-x Extracts the les identied in the le operands from the archive specied in the
archive operand. The contents of the archive le are not changed. If no le
operands are specied, all les in the archive are extracted. If the lename of a
le to be extracted from the archive is longer than the name length supported for
the target directory, an error results and, unless -T has also been specied, the
le is not extracted. If -T has also been specied, the le is extracted and given
a truncated lename. The modication time of each extracted le is set to the
time the le is extracted from the archive.
DESCRIPTION
The ar command creates and maintains groups of one or more named les as a single archive
(library) le written in ar archive format. After an archive le has been created, new les can be
added to the archive le, and existing les can be extracted from it, deleted, or replaced.
The ar command accepts the following as archive members:
All OSS les
Guardian TNS code les
Accelerated object les
Guardian C text les (le code 180 les)
TNS/R (PIC and non-PIC) native object les
TNS/E native linkles or loadles
You can mix one or more object le formats in one archive le. However, such an archive le
cannot be used by the Binder or the nld, ld,oreld utility.
If an archive le contains only les in a single object le format, an archive symbol table is
created as the rst le member of the archive le. The format of this table depends upon the
linker utility for the corresponding object le format. This table is maintained by ar and used by
the Binder (for TNS and accelerated object les), the nld utility (for TNS/R native non-PIC
object les), the ld utility (for TNS/R native PIC object les), and the eld utility (for TNS/E
native PIC les) to search the archive le and extract archive members from it.
When the ar utility is used to create or update the content of such an archive, the symbol table is
rebuilt automatically. The -s ag forces the symbol table to be rebuilt.
An archive le embedded as a member of another archive le is not used by the Binder or the nld
utility, the ld utility, or the eld utility.
All le operands can be pathnames. However, les within archive les are given a lename,
which is the last component of the pathname used when the le was entered into the archive le.
Multiple les within the archive le can be identically named. In these cases, each le and
position_name operand matches only the rst archive le having a name that is the same as the
last component of the le or position_name operand.
An archive le can be created for the OSS, Guardian, or a target-independent execution environ-
ment. An OSS archive le is made up of OSS and target-independent object les. A Guardian
archive le is made up of Guardian and target-independent object les. A target-independent
527188-007 Hewlett-Packard Company 19