HP-UX Reference (11i v3 07/02) - 3 Library Functions A-M (vol 6)

d
dlopen_pa(3C) dlopen_pa(3C)
(HP 9000 Systems Only)
[RTLD_ERR_CODE_UNSAT] Unsatisfied code symbol in library.
[RTLD_ERR_DATA_UNSAT] Unsatisfied data symbol in library.
[RTLD_ERR_DLDD_COMM_FAILURE]
Library needs a shared fixed address but unable to obtain it from
dldd.
[RTLD_ERR_DLOPEN_BAD_FLAGS]
Invalid flags for
dlopen().
[RTLD_ERR_DLOPEN_TLS_LIB]
Cannot dlopen() library because it contains TLS data.
[RTLD_ERR_DLOPENE_BAD_ADDR]
Invalid load address for segment (dlopene() only).
[RTLD_ERR_DLOPENE_NO_EXEC_PERM]
Shared library missing execution permission (
dlopene()
only).
[RTLD_ERR_DYN_FILTER_STLS_REF]
Library contains a static TLS reference to a symbol defined in a dynami-
cally loaded library.
[RTLD_ERR_FILTER_TLS] Cannot open filtered library: TLS size exceeds size recorded in filter.
[RTLD_ERR_INTERNAL_ERROR]
Internal error encountered in
dld.
[RTLD_ERR_IO] I/O error mapping library.
[RTLD_ERR_LIB_OPEN] Unable to find library.
[RTLD_ERR_MMAP_FAILED]
mmap() failed for library.
[RTLD_ERR_MPROTECT_FAILED]
mprotect() failed for the library.
[RTLD_ERR_NO_MEMORY] Out of memory.
[RTLD_ERR_NOMMAP_FAILED]
Encounter error while loading library (dlopene() only).
[RTLD_ERR_NON_TLS_RELOC_TO_TLS_SYM]
Non-thread-specific relocation referencing TLS symbol.
[RTLD_ERR_OPEN] Unable to open library.
[RTLD_ERR_PREALLOC_ADDR_NOT_USE]
Cannot use pre-allocated address for mapping library that requires a fixed
address (dlopene() only).
[RTLD_ERR_SETCANCELSTATE_FAILED]
__thread_setcancelstate
failed on entry to or exit from dld API.
[RTLD_ERR_SIGENABLE_FAILED]
sigenable failed on exit from dld API.
[RTLD_ERR_SIGINHIBIT_FAILED]
siginhibit failed on entry to dld API.
[RTLD_ERR_TPREL_NON_TLS_SYM]
TPREL relocation on non-TLS symbol.
EXAMPLES
The following example illustrates the use of dlopene() to load a shared library with an explicit data seg-
ment address. For simplicity, error checking has been omitted.
#include <dlfcn.h>
#include <sys/mman.h>
int main() {
struct dlfileinfo info;
void *handle;
struct dlopen_opts opts;
HP-UX 11i Version 3: February 2007 5 Hewlett-Packard Company 315