Retrieve the .Vt Link_map (Vt "struct link_map") structure pointer for the specified handle. On successful return, the p argument is filled with the pointer to the .Vt Link_map structure ("Link_map **p") describing a shared object specified by the handle argument. The .Vt Link_map structures are maintained as a doubly linked list by ld.so(1), in the same order as dlopen(3) and dlclose(3) are called. See EXAMPLES, example 1.
The .Vt Link_map structure is defined in .In link.h and has the following members:
caddr_t l_addr; /* Base Address of library */
const char *l_name; /* Absolute Path to Library */
const void *l_ld;/* Pointer to .dynamic in memory */
struct link_map *l_next, /* linked list of mapped libs */
*l_prev;
l_addr
The base address of the object loaded into memory.
l_name
The full name of the loaded shared object.
l_ld
The address of the dynamic linking information segment (PT_DYNAMIC) loaded into memory.
l_next
The next .Vt Link_map structure on the link-map list.
l_prev
The previous .Vt Link_map structure on the link-map list.
RTLD_DI_SERINFO
Retrieve the library search paths associated with the given handle argument. The p argument should point to .Vt Dl_serinfo structure buffer ("Dl_serinfo *p"). The .Vt Dl_serinfo structure must be initialized first with the RTLD_DI_SERINFOSIZE request.
The returned .Vt Dl_serinfo structure contains dls_cnt .Vt Dl_serpath entries. Each entrys dlp_name field points to the search path. The corresponding dlp_info field contains one of more flags indicating the origin of the path (see the LA_SER_* flags defined in the .In link.h header file). See EXAMPLES, example 2, for a usage example.
RTLD_DI_SERINFOSIZE
Initialize a .Vt Dl_serinfo structure for use in a RTLD_DI_SERINFO request. Both the dls_cnt and dls_size fields are returned to indicate the number of search paths applicable to the handle, and the total size of a .Vt Dl_serinfo buffer required to hold dls_cnt .Vt Dl_serpath entries and the associated search path strings. See EXAMPLES, example 2, for a usage example.
RTLD_DI_ORIGIN
Retrieve the origin of the dynamic object associated with the handle. On successful return, p argument is filled with the .Vt char pointer ("char *p").