HP-UX Reference (11i v3 07/02) - 3 Library Functions N-Z (vol 7)

s
shl_load_ia(3X)
Integrity Systems Only
shl_load_ia(3X)
[ENOMEM] There is insufficient room in the address space to load the library.
[ENOENT] The specified path does not exist, or the specified handle is invalid.
[ETXTBSY] The specified shared library is currently in use and cannot be unloaded.
[EACCES] Read or execute permission is denied for the specified library.
WARNINGS
shl_unload() detaches the library from the process and frees the memory allocated for it, but does not
break existing symbolic linkages into the library. In this respect, an unloaded shared library is much like a
block of memory deallocated via free() (see malloc(3C)).
Some implementations may not, by default, export all symbols defined by a program (instead exporting only
those symbols that are imported by a shared library seen at link time). Therefore the
-E option to ld(1)
should be used when using these routines if the loaded libraries are to refer to program symbols.
All symbol information returned by
shl_getsymbols()
, including the name field, become invalid once
the associated library is unloaded by
shl_unload()
. This is also true if a library is unloaded by a call to
dlclose().
Use caution when building shared libraries with external library dependencies. Any library that contains
Thread Local Storage (TLS) and uses static TLS model should not be used as a dependency. See "Thread
Local Storage" in dld.so(5) for more information. If a dependent library contains TLS, was built with static
TLS model and it is not loaded during program startup (that is, not linked against the executable), the
dynamic loader fails to perform the operation. You can use +tls=dynamic compiler option to re-compile
the library to avoid errors.
When a routine or flag is used which may not be supported in the future, the dynamic loader can display a
warning message. See the WARNINGS section in dld.sl(5) for further details.
Future HP-UX environments may not support these routines and flags or may only support a subset of
them. Instead, they will use the SVR4 dynamic loading API. Users are encouraged to migrate to the
dl*
family of dynamic linking routines. See the dlclose(3C), dlerror(3C), dlget(3C), dlgetname(3C),
dlmodinfo(3C), dlopen(3C), and dlsym(3C) man pages for more information.
AUTHOR
shl_load(3X) and related functions were developed by HP.
SEE ALSO
System Tools
ld(1) invoke the link editor
Miscellaneous
dld.so(5) dynamic loader
dlclose(3C) unload a shared library previously loaded by
dlopen()
dlerror(3C) print the last error message recorded by dld
dlget(3C) return information about a loaded module
dlgetname(3C) return the name of the storage containing a load module
dlmodinfo(3C) return information about a loaded module
dlopen(3C) load a shared library
dlsym(3C) get the address of a symbol in a shared library
Texts and Tutorials
HP-UX Linker and Libraries Online User Guide
(See the +help option to ld(1))
HP-UX Linker and Libraries User’s Guide
(See manuals(5) for ordering information)
HP-UX 11i Version 3: February 2007 5 Hewlett-Packard Company 407