HP-UX Reference (11i v1 05/09) - 3 Library Functions A-M (vol 6)
d
dlerrno(3C) dlerrno(3C)
(ELF Applications Only)
NAME
dlerrno() - get error code for dynamic linking calls
SYNOPSIS
cc [flag... ] file...
-ldl [library]...
#include <dlfcn.h>
int *dlerrno(void);
DESCRIPTION
dlerrno() is one of a family of routines that give the user direct access to the dynamic linking facilities
(using the
-ldl option on the compiler or
ld command line). dlerrno() returns a numeric error code
that corresponds to the last error that occurred during dynamic linking processing. If no dynamic linking
errors have occurred since the last invocation of
dlerrno, dlerrno returns [RTLD_ERR_NO_ERR] (
-
1
). Thus, invoking dlerrno() a second time, immediately following a prior invocation, results in
[RTLD_ERR_NO_ERR] (
-1) being returned.
The following is a complete list of the mnemonic error codes. The numeric values can be found in
<dlfcn.h>.
[RTLD_ERR_UNKNOWN_ERR] Unknown error.
[RTLD_ERR_NO_ERR] No Error.
[RTLD_ERR_OPEN] Cannot open load module.
[RTLD_ERR_IO] I/O error mapping load module
[RTLD_ERR_BAD_DLL] Load module is not valid.
[RTLD_ERR_BAD_ELF_VER] Unknown ELF version in library.
[RTLD_ERR_LIB_OPEN] Unable to find library.
[RTLD_ERR_NO_MEMORY] Cannot allocate dynamic memory.
[RTLD_ERR_BAD_RELOC] Unknown relocation type.
[RTLD_ERR_INTERNAL_ERROR] Internal error encountered.
[RTLD_ERR_DLOPEN_BAD_FLAGS]
Invalid flag to dlopen() call.
[RTLD_ERR_CANT_APPLY_RELOC]
Failed to apply relocation.
[RTLD_ERR_INV_NEXT_HANDLE]
Invalid RTLD_NEXT argument.
[RTLD_ERR_UNKNOWN_SYMBOL]
Unknown symbol.
[RTLD_ERR_INV_LIB_INDEX] Invalid load module index.
[RTLD_ERR_INV_HANDLE] Invalid load module handle.
[RTLD_ERR_DLCLOSE_REMAINING_DEP]
Cannot close load module due to remaining dependencies.
[RTLD_ERR_TPREL_NON_TLS_SYM]
TPREL relocation on non-thread-specific symbol.
[RTLD_ERR_NON_TLS_RELOC_TO_TLS_SYM]
Non-thread-specific relocation reference to thread specific sym-
bol.
[RTLD_ERR_MMAP_FAILED] mmap() failed.
[RTLD_ERR_DLOPEN_TLS_LIB] Cannot dlopen() load module with thread-specific data.
[RTLD_ERR_UNLOAD_HANDLE] Invalid load module handle for unload.
[RTLD_ERR_UNLOAD_DEP] Cannot unload load module due to remaining dependencies.
HP-UX 11i Version 1: September 2005 − 1 − Hewlett-Packard Company Section 3−−153