rld Manual

RLD Manual528857-006
1-1
1 RLD Overview
This document describes the runtime linker (also called the runtime loader) that
provides support for Dynamic-Link Libraries (DLLs) and their client programs, both of
which use Position Independent Code (PIC). The description of all functionality is the
same on TNS/R and TNS/E unless specifically noted as being for one or the other.
Support for building a DLL from compiler generated object files, is provided by the
linkers; ld on TNS/R and eld on TNS/E.
The runtime linker encompasses both rld and the runtime linking functions
dlopen(), dlclose(), dlsym(), dlresultcode() and dlerror(). rld is
the facility that loads a PIC program and its requisite libraries; the runtime linking
functions gives the user the ability to dynamically link to libraries on demand.
rld supports 32-bit loadfiles, 64-bit loadfiles, and neutral loadfiles on TNS/E OSS
platform. Only 32-bit loadfiles are supported on all other platforms. rld supports 64-bit
loadfiles from the H06.24/J06.13 RVUs onward.
The runtime linker (also referred to as the loader library) resides in an SRL on TNS/R
and in a DLL on TNS/E.
Installation for TNS/R
rld is distributed in each release of the NonStop operating system as the linkable
object file ZRLDREL, and is converted to the hybrid SRL ZRLDSRL when the release
is installed. The SRL does not use any explicit public libraries.
After installation, the loader library is accessible to C/C++ programs through the
header files dlfcnh (Guardian) and dlfcn.h (OSS), and to pTAL programs through
the header file hdlfcn (Guardian only).
The main entry point, RLD_Main, of the loader library designates the start of the rld
code and must be set at link time with the linker's -e RLD_Main option.
Installation for TNS/E
On the TNS/E platform, the loader library exists as a DLL called ZRLDDLL. The DLL
does not use any explicit public libraries.
Headers for the following compiler languages will be provided. For the C/C++
languages, declarations for the runtime dynamic linking functions and the dlopen()
mode options are provided in a header file called dlfcnh on the Guardian platform
and dlfcn.h on the OSS/Unix/PC platforms. For the pTAL language, a header file
called hdlfcn is provided on the Guardian platform containing the same declarations.
How the HP NonStop Operating System works with rld
The operating system uses rld to load PIC programs and their requisite libraries,
instead of using internal code as used to load TNS and non-PIC TNS/R programs and