dlopen_pa.3c (2010 09)

d
dlopen_pa(3C)
PA-RISC Systems Only
dlopen_pa(3C)
[RTLD_ERR_BAD_DLL_SEGMENT_COUNT] Library needs a shared fixed address but has multi-
ple data segments.
[RTLD_ERR_BAD_ELF_VER] Unknown elf version in library.
[RTLD_ERR_BAD_RELOC] Unknown relocation type.
[RTLD_ERR_CANT_APPLY_RELOC] Cannot apply relocation in library.
[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 (
dlo-
pene() only).
[RTLD_ERR_DYN_FILTER_STLS_REF] Library contains a static TLS reference to a symbol
defined in a dynamically 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 sym-
bol.
[RTLD_ERR_OPEN] Unable to open library.
[RTLD_ERR_PREALLOC_ADDR_NOT_USE] Cannot use pre-allocated address for mapping library
that requires a xed 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
segment 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;
int status;
HP-UX 11i Version 3: September 2010 5 Hewlett-Packard Company 5