HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
d
dlget(3C) dlget(3C)
(64-Bit Applications Only)
NAME
dlget - retrieve information about a loaded module (program or shared library)
SYNOPSIS
cc [flag ... ] file ... -ldl [library] ...
#include <dlfcn.h>
void *dlget(unsigned int index,
struct load_module_desc *desc,
size_t desc_size);
DESCRIPTION
dlget is one of a family of routines that give the user direct access to the dynamic linking facilities.
dlget returns information about a loaded module for a process. retrieves information about a load
module from an index specifying the placement of the load module in the dynamic loader’s search list. An
index of zero requests information about the program file itself. An index of -1 requests info about the
dynamic loader.
If successful, dlget returns a handle for the shared library as defined by the return value from
dlo-
pen()
.
desc must be preallocated by the user. The structure members are filled in by the dynamic loader with
information about the requested shared library.
A load_module_desc structure has the following members:
struct load_module_desc {
unsigned long text_base;
unsigned long text_size;
unsigned long data_base;
unsigned long data_size;
unsigned long unwind_base;
unsigned long linkage_ptr;
unsigned long phdr_base;
unsigned long tls_size;
unsigned long tls_start_addr;
}
desc_size specifies the size in bytes of the load_module_desc structure sent in by the user.
If a call to
dlget is unsuccessful, a NULL pointer is returned and desc remains unchanged.
MULTITHREAD USAGE
This routine is thread-safe.
AUTHOR
dlget() 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) Prints the last error message recorded by dld.
dlgetname(3C) Returns the name of the storage containing a load module.
dlmodinfo(3C) Returns information about a loaded module.
dlopen(3C) Loads a shared library.
dlsym(3C) Gets the address of a symbol in a shared library.
Section 3−−150 − 1 − HP-UX Release 11i: December 2000
___
___