shl_load_pa.3x (2010 09)

s
shl_load_pa(3X)
PA-RISC Systems Only
shl_load_pa(3X)
NAME
shl_load_pa: shl_load(), shl_definesym(), shl_findsym(), shl_get(), shl_get_r(), shl_gethandle(),
shl_gethandle_r(), shl_getsymbols(), shl_unload(), dld_getenv() - explicit load of shared libraries for PA-
RISC systems
SYNOPSIS
#include <dl.h>
shl_t shl_load(const char *path, int flags, long address);
int shl_findsym(
shl_t *handle,
const char *sym,
short type,
void *value
);
int shl_definesym(
const char *sym,
short type,
long value,
int flags
);
int shl_getsymbols(
shl_t handle,
short type,
int flags,
void *(*memory) (),
struct shl_symbol **symbols,
);
int shl_unload(shl_t handle);
int shl_get(int index, struct shl_descriptor **desc);
int shl_gethandle(shl_t handle, struct shl_descriptor **desc);
int shl_get_r(int index, struct shl_descriptor *desc);
int shl_gethandle_r(shl_t handle, struct shl_descriptor *desc);
void dld_getenv();
Remarks
This manpage describes shl*() routines on PA-RISC systems. For
shl*() routines on Integrity sys-
tems, see shl_load_ia (3X).
DESCRIPTION
These routines can be used to programmatically load and unload shared libraries, and to obtain informa-
tion about the libraries (such as the addresses of symbols defined within them). On PA-RISC 32-bit sys-
tems, the routines themselves are accessed by specifying the
-ldld option on the command line with the
cc or ld command (see cc(1) and ld(1)). On PA-RISC 64-bit systems, the routines are accessed by speci-
fying either -ldld or -ldl on the command line. See WARNINGS . In addition, the -E option to the
ld command can be used to ensure that all symbols defined in the program are available to the loaded
libraries. This is the default behavior on PA-RISC 64-bit systems.
Shared libraries are created by compiling source files and linking the resultant object files with the
-b
(create shared library) option.
shl_load()
Attaches the shared library named by path or the shared library name that is constructed by using
the path part of path plus the shared library basename followed by the suffix .0 (e.g.
/usr/lib/pa20_64/libname.0) to the process, along with all its dependent libraries. A .0
version is looked for first for those shared libraries that do not have internal names. See ld(1)).
The library is mapped at the specified address .Ifaddress is 0L, the system chooses an appropriate
address for the library. This is the recommended practice because the system has the most complete
knowledge of the address space; currently, the address field is ignored, and assumed to be 0L.If
the shared library contains thread local storage, you cannot load it with this routine.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (6 pages)