
ar Utility
nld and noft Manual — 520384-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.
Summary of Contents for nld
Page 12: ...Contents nld and noft Manual 520384 003 x ...
Page 16: ...What s New in This Manual nld and noft Manual 520384 003 xiv Miscellaneous ...
Page 22: ...About This Manual nld and noft Manual 520384 003 xx Change Bar Notation ...
Page 28: ...Introduction to the Utilities nld and noft Manual 520384 003 1 6 strip ...
Page 60: ...nld Utility nld and noft Manual 520384 003 2 32 Declaration and Definition ...
Page 78: ...nld Options nld and noft Manual 520384 003 3 18 y ...
Page 90: ...noft Utility nld and noft Manual 520384 003 4 12 Debugging With noft ...
Page 150: ...strip Utility nld and noft Manual 520384 003 7 2 ...
Page 242: ...nld Diagnostic Messages nld and noft Manual 520384 003 10 82 Informational Messages ...
Page 278: ...noft Diagnostic Messages nld and noft Manual 520384 003 11 36 Syntax Errors ...
Page 286: ...ar Diagnostic Messages nld and noft Manual 520384 003 12 8 ...
Page 314: ...Sample nld and noft Session nld and noft Manual 520384 003 A 28 LISTSRLFIXUPS ...
Page 330: ...Index nld and noft Manual 520384 003 Index 10 Special Characters ...