eld Input and Output
eld Manual—527255-009
2-17
Using Archives
or
/usr/local/lib64
then, the same
-l
option in the linker verifies the desired one
based on the type of link created. Otherwise, the user can decide the naming
convention for the archives and formulate the linker to find the right version.
Archives are a method of making loadfiles smaller, because the linker will automatically
bring into the link only those members of the archive which are needed. Archives are
also a way of packaging together multiple linkfiles, as an alternative to using the
-r
option.
The Steps in Looking for Archives and DLLs
The linker performs the following steps, in the order given, to search for an archive or
DLL:
1. The linker first looks in the directories or subvolumes whose names are
specified in
-first_L
options in the command stream, in the same order that
those options occurred in the command stream.
2. The linker next looks for public libraries. However, the linker does not do this if
the
-r
option is specified or if
-b static
is in effect.
3. The linker next looks in the directories or subvolumes whose names are
specified in
-L
options in the command stream, in the same order that those
options occurred in the command stream. The
-libvol
option is a synonym
for
-L
, and preferred because the
-libvol
option is not case- sensitive,
whereas
-L
is a different option from
-l
.
4. On OSS, the linker looks in a list of standard places. If the linker is building a
64-bit object, or if the
-alf
option is processing a 64-bit loadfile, then the first
three places in this list are
/lib64
,
/usr/lib64
and
/usr/local/lib64
.
In all other cases, the next three places in the list are
/lib,
/usr/lib,
and
/usr/local/lib
. Each of the above names is prefixed with the contents of
the
COMP_ROOT
environment variable, if the variable is defined.
5. Finally, on Guardian or OSS, if the linker is building a 64-bit object or if the
-alf
option is processing a 64-bit loadfile, the linker looks into the
$SYSTEM.YDLL
and in all other cases the linker looks into
$SYSTEM.ZDLL
.
However, the linker does not perform these actions if the
-r
option is specified
or if
-b
static is in effect.
The following sub-section tells the rules that are used for looking for public libraries
(step 2 above), and the sub-section after that tells what the linker does when it is
looking through other directories or subvolumes (all the steps above other than step 2).
If the
-nostdlib
option is specified, steps (2), (4), and (5) in the above list are
skipped, so that the linker would only look in the places specified by
-first_L
or
-L
options. The option
-no_stdlib
is accepted as a synonym for
-nostdlib
.
The same search method is used for all searches. For example, it doesn’t matter
whether some of the
-L
options came later in the command stream than the
-l
option for which the search is being performed.
Содержание eld
Страница 4: ......
Страница 8: ...Contents eld Manual 527255 009 iv ...
Страница 12: ...What s New in This Manual eld Manual 527255 009 viii Changes to the 527255 005 Manual ...
Страница 34: ...Introduction to eld eld Manual 527255 009 1 14 Example of Use ...
Страница 54: ...eld Input and Output eld Manual 527255 009 2 20 Using Archives ...
Страница 98: ...Other eld Processing eld Manual 527255 009 4 20 Merging Source RTDUs ...
Страница 242: ...Output Listings and Error Handling eld Manual 527255 009 6 132 Glossary of Errors ...