HP-UX Reference (11i v1 05/09) - 3 Library Functions A-M (vol 6)
d
dlgetname(3C) dlgetname(3C)
(ELF Application Only)
NAME
dlgetname() - retrieve the name of a load module given a load module descriptor
SYNOPSIS
cc [flag]... file...
-ldl [library]...
#include <dlfcn.h>
char *dlgetname(struct load_module_desc *desc,
size_t desc_size,
void *(*read_tgt_mem)(void* buffer,
unsigned long long ptr,
size_t bufsiz,
int ident),
int ident_parm,
unsigned long long load_map_parm);
Multithread Usage
This routine is thread-safe.
DESCRIPTION
dlgetname() is one of a family of routines that give the user direct access to the dynamic linking facili-
ties. dlgetname() returns the pathname of a load module represented by desc. The read_tgt_mem,
ident_parm, and load_map_parm parameters are identical to those for
dlmodinfo() . See
dlmodinfo(3C).
The caller of
dlgetname() must copy the return value to insure that it is not corrupted.
RETURN VALUE
If desc does not describe a loaded module, then NULL is returned. More detailed diagnostic information is
available through dlerror() .
ERRORS
If dlgetname() fails, a subsequent call to dlerrno returns one of the following values:
[RTLD_ERR_NO_MEMORY] Out of memory.
[RTLD_ERR_CANT_APPLY_RELOC]
Cannot apply relocation in library.
[RTLD_ERR_SIGINHIBIT_FAILED]
siginhibit failed on entry to dlgetname() .
[RTLD_ERR_SIGENABLE_FAILED]
sigenable failed on exit from dlgetname() .
[RTLD_ERR_READ_TGT_MEM_FAILED]
read_tgt_mem failed in reading target memory.
[RTLD_ERR_SETCANCELSTATE_FAILED]
__thread_setcancelstate failed on entry to or exit from
dlgetname() .
AUTHOR
dlgetname() was developed by HP.
SEE ALSO
System Tools
exec(2) System loader.
ld(1) Invokes the link editor.
Miscellaneous
a.out(4) Assembler, compiler, and linker output.
dlclose(3C) Unloads a shared library previously loaded by dlopen().
dlerror(3C) Returns the last error message recorded by dld.
dlerrno(3C) Returns an error code for the last error recorded by dld.
HP-UX 11i Version 1: September 2005 − 1 − Hewlett-Packard Company Section 3−−165