Specifying Runtime Search Path Information For Dlls - HP eld Manual

Table of Contents

Advertisement

Other eld Processing
When building a program in C or C++, and using the standard runtime library support
provided by these compilers, the usual method is to place in the linker command
stream an object file that is also supplied with these compilers and contains a
procedure that has the MAIN attribute. Users who invoke the linker through the
compiler may not realize this, because the compiler automatically adds the file name to
the linker command stream when it invokes the linker. Thus, for most users of C or
C++, the main procedure is not a procedure they've written themselves, and there is no
need to use the -e option. If you use the -e option and specify the wrong procedure
(for instance, the procedure named main that you've written) as the main entry point,
and you ignore the linker warning about this, then you will probably build a program
that will not run correctly because it will not start at the proper point.

Specifying Runtime Search Path Information for DLLs

The linker fills in the DT_RPATH and DT_TANDEM_RPATH_FIRST entries of the
.dynamic section to tell rld where to find DLLs at load time. Each of these fields is a
list of places to look, where a colon separates the names in the list. The individual
names cannot contain colons. The commands used for filling in these entries, and the
purposes of these entries, are as follows:
DT_RPATH tells places to look after looking for public DLLs. The -rld_L
option specifies a string to place into DT_RPATH. -rpath is accepted as a
synonym for -rld_L.
DT_TANDEM_RPATH_FIRST tells places to look before looking for public
DLLs. The -rld_first_L option specifies a string to place into
DT_TANDEM_RPATH_FIRST.
Each of the -rld_L and -rld_first_L options may be specified multiple times in
the command stream. The linker concatenates the information provided, in the order
the options were given. The linker understands that names are separated by colons,
and removes duplicate names from the list.
options with -r.
Note that the linker does not try to detect names that are "invalid" for any reason and
remove them from the list.
Note that the -rld_L and -rld_first_L options are allowed whether building a
program or a DLL. rld only uses this information found in programs. However, the
linker looks at this information in each DLL that it uses in a link that is creating a
loadfile. The linker concatenates this information from DLLs the same as if the
corresponding values had been given in the command stream, considering them to
come at the end of the command stream and in the same order as the DLLs were
found by the linker.
The -limit_runtime_paths option is used to tell rld that its algorithm for looking
for DLLs is not to be concerned with the location of the program nor with any runtime
path specifications. When this option is specified the linker turns on the
LIMIT_RUNTIME_PATHS bit in the flags field of the .tandem_info section.
Specifying Runtime Search Path Information for
reports an error if you specify these
eld
eld Manual—527255-009
4-18
DLLs

Advertisement

Table of Contents
loading

Table of Contents