![HP nld Скачать руководство пользователя страница 49](http://html.mh-extra.com/html/hp/nld/nld_manual_165146049.webp)
nld Utility
nld and noft Manual — 520384-003
2- 21
Linking Archive Files
Linking Archive Files
The
nld
utility supports archive files for selecting input object files when building a new
object file. An archive file is created by the
ar
utility and contains a collection of object
files. Any type of file can be put into an archive, but
nld
uses only the relinkable
TNS/R native object files in an archive file.
To create an archive file, you can use the
ar
utility in either the Guardian environment,
the OSS environment, or on platforms running Windows. The
nld
utility supports
archive files existing in the Guardian and OSS environments, regardless of where the
archives were created. The
ar
utility is described in
Section 6, ar Utility
.
In the OSS environment, archive files often have filenames that start with
lib
and end
with the filename suffix
.a
, such as
libc.a
.
You can specify archive files on the
nld
command line directly and with the options
-l
or -lib
on page 3-7. Specifying archive files with options is usually easier to understand
than specifying archive files on the command line.
nld
resolves references using archive files in the order they are specified, either on
the command line directly or with
-l
or
-lib
options.
nld
searches an archive file to resolve references. When
nld
finds object files that
satisfy references, it copies them from the archive file to the target object file. Unlike
Binder,
nld
copies the entire object file, not only the individual procedure.
For example, given object files
obja
,
objb
, and
objc
and archive files
arc1
and
arc2
and the following
nld
command line:
nld obja objb -lib arc1 objc arc2 -o myexec
nld
performs the following steps:
1. Copies
obja
and
objb
.
2. Searches
arc1
for unresolved references in
obja
and
objb
. For those references
satisfied in
arc1
,
nld
copies the object file satisfying the reference.
3. Copies
objc
.
4. Searches
arc2
for unresolved references in
obja
,
objb
, and
objc
.
nld
also
searches
arc2
for unresolved references in object files copied from
arc1
.
A duplicate reference in an object file or an archive file is an error.
Содержание nld
Страница 12: ...Contents nld and noft Manual 520384 003 x ...
Страница 16: ...What s New in This Manual nld and noft Manual 520384 003 xiv Miscellaneous ...
Страница 22: ...About This Manual nld and noft Manual 520384 003 xx Change Bar Notation ...
Страница 28: ...Introduction to the Utilities nld and noft Manual 520384 003 1 6 strip ...
Страница 60: ...nld Utility nld and noft Manual 520384 003 2 32 Declaration and Definition ...
Страница 78: ...nld Options nld and noft Manual 520384 003 3 18 y ...
Страница 90: ...noft Utility nld and noft Manual 520384 003 4 12 Debugging With noft ...
Страница 150: ...strip Utility nld and noft Manual 520384 003 7 2 ...
Страница 160: ...Converting From Binder to nld and noft nld and noft Manual 520384 003 9 8 Comparing Binder Commands to noft Options ...
Страница 242: ...nld Diagnostic Messages nld and noft Manual 520384 003 10 82 Informational Messages ...
Страница 278: ...noft Diagnostic Messages nld and noft Manual 520384 003 11 36 Syntax Errors ...
Страница 286: ...ar Diagnostic Messages nld and noft Manual 520384 003 12 8 ...
Страница 314: ...Sample nld and noft Session nld and noft Manual 520384 003 A 28 LISTSRLFIXUPS ...
Страница 330: ...Index nld and noft Manual 520384 003 Index 10 Special Characters ...