nld and noft Manual

ar Utility
nld and noft Manual520384-003
6-6
ar accepts many kinds of files as archive members. ar recognizes two kinds of HP
object 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 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 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 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 files in that environment.
An archive symbol table is created as the first file member of the archive file for a
successful archive operation when there is at least one object file 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 file embedded as a member of another archive file is not usable by Binder
or nld.
A file within an archive is named by a filename, which is the last component of the
pathname 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 file. 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 file 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
kind of HP object file for the linker used (Binder or nld).
It is your responsibility to insure 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 on the 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 and rld Reference Manual.