noft Manual (G06.27+, H06.03+, J06.03+)

ar Utility
noft Manual528273-003
5-6
ar accepts many types of files as archive members. ar recognizes two types of HP
object code files: TNS and TNS/R. All other files, including text files, are considered
target-independent files. Only archives composed entirely of the same kind of HP
object code file and target-independent files contain an archive symbol table and are
suitable for use by Binder or nld. If ar detects mixing of the two kinds of HP object
code files, it generates the archive but does not generate a symbol table, issuing an
appropriate warning message instead.
When an archive contains both TNS and TNS/R object code files, it is not usable by
either Binder or nld because no symbol table is generated. When such an archive is
generated on Windows platforms, however, no error message is displayed because
TNS files are not recognized as object code files in that environment.
An archive symbol table is created as the first file member of the archive for a
successful archive operation when at least one object code file is in the archive. The
symbol table is maintained by ar and is used by Binder or nld to search the archive.
Whenever ar is used to create or update the contents of such an archive, ar rebuilds
the symbol table. The -s option of ar forces the symbol table to be rebuilt.
An archive embedded as a member of another archive is not usable by Binder or nld.
A file within an archive is named by a file name, which is the last component of the
path name used when the file was entered into the archive. The comparison of a file
operand to the name of a file in an archive is performed by comparing the last
component of the operand to the name of the archive. In the Guardian environment
and on platforms running Windows, this comparison is case-insensitive.
Multiple files in an archive can have the same name. In such a case, however, each
file and position-name operand matches only the first archive having a name
that is the same as the last component of the operand.
In the OSS environment, ar accepts OSS files as archive members. Archive libraries
built by ar in any environment can be used for linking in any environment where
Binder or nld runs, provided the archive contains a symbol table and the appropriate
type of HP object code file for the linker used (Binder or nld).
You must verify that archive members are appropriate for the target environment. For
example, archive members must be compiled as OSS targets when they are to be
used to construct an application that will run in the OSS environment.
For more information about ar utility, see the Open System Services Shell and Utilities
Reference Manual.
Note. The ar utility can also use archives created by the ld utility. For information about the
ld utility, see the ld Manual.