HP eld Manual page 47

Table of Contents

Advertisement

eld Input and Output
See
Presetting Loadfiles
indirect DLLs by using the .liblist sections of other DLLs that it has already found, and
for how the linker finds the import library that represents the implicit DLLs.
See
Using User Libraries
libraries.
The linker does not have any built-in set of DLLs for which to look, other than the
import library that represents the implicit DLLs. Although other DLLs may typically be
needed for C/C++ runtime support, they must be specified explicitly in the linker's
command stream. The user who invokes the linker indirectly through the C/C++
compiler may be unaware of this, because the C/C++ compiler automatically adds the
appropriate command stream items when it invokes the linker.
The linker looks for import libraries the same way it looks for DLLs. Unless mentioned
otherwise, when this section explains how the linker finds DLLs, the same remarks
apply to import libraries. The linker accepts archives, DLLs, or both, according to the
following options:
-b static
-b dllsonly
-b dynamic
These options form a three-way switch, selecting one of three modes for the linker at a
given point in the command stream. These options can be specified multiple times in
the command stream, each time setting the mode for subsequent items in the
command stream until the mode is changed again. At the beginning of the command
stream the mode is -b dynamic.
An item in the command stream that causes the linker to find a linkfile, archive, or DLL
is one of the following three things:
a name specified directly in the command stream
a -l option whose parameter is a file identifier
a -l option whose parameter is not a file identifier
The definition of file identifier is given in
The -lib option is a synonym for -l, and may be preferred because the -lib
option is not case-sensitive, whereas -l is a different option from -L.
The linker uses one of the following two methods to find a file, based on the way it was
specified in the command stream:
for a name specified directly in the command stream, or for a full filename
specified in a -l option, the linker opens the file normally.
for a file identifier specified in a -l option, the linker searches for the file.
Opening a file normally means that the linker tries to open the name exactly as it is
specified. This means that the name may be interpreted relative to the current directory
on page 3-5 for an explanation of how the linker also finds
on page 3-10 for an explanation of how the linker finds user
- only accept archives, not DLLs
- only accept DLLs, not archives
- accept both archives and DLLs
Filenames and The File Identifier
eld Manual—527255-009
2-13
Input Object Files
on page 2-2.

Advertisement

Table of Contents
loading

Table of Contents