NAME | SYNOPSIS | DESCRIPTION | ATTRIBUTES | SEE ALSO | NOTES
cc [ flag ... ] file ... -ldl [ library ... ] #include <dlfcn.h>int dlinfo(void *handle, int request, void *p);
dlinfo() extracts information about a dynamically-loaded object. This interface is loosely modeled after the ioctl() interface. request and a third argument with varying type are passed to dlinfo(). The action taken by dlinfo() depends on the value of the request provided. handle is a value returned from a dlopen() or dlmopen() call.
The following are possible values for request to be passed into dlinfo():
obtains the id for the link-map list upon which the handle is loaded. p is a Lmid_t pointer ( Lmid_t *p).
obtains the Link_map for the handle specified. p points to a Link_map pointer ( Link_map **p ). The actual storage for the Link_map structure is maintained by ld.so.1.
unsigned long l_addr; /* base address */ char * l_name; /* object name */ Elf32_Dyn * l_ld; /* .dynamic section */ Link_map * l_next; /* next link object */ Link_map * l_prev; /* previous link object */ char * l_refname; /* filter reference name */
The base address of the object loaded into memory.
Full name of the loaded object. This is the filename of the object as referenced by ld.so.1.
Points to the SHT_DYNAMIC structure.
The next Link_map on the link-map list, other objects on the same link-map list as the current object may be examined by following the and l_prev fields.
The previous Link_map on the link-map list.
If the object referenced is a filter this field points to the name of the object being filtered. If the object is not a filter, this field will be 0. See Linker and Libraries Guide
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
MT Level | MT-Safe |
ld(1), ioctl(2), dlclose(3X), dldump(3X), dlerror(3X), dlmopen(3X), dlopen(3X), dlsym(3X), attributes(5)
These routines are available to dynamically-linked processes only.
NAME | SYNOPSIS | DESCRIPTION | ATTRIBUTES | SEE ALSO | NOTES