252 Chapter 6
Shared Library Management Routines
The dlopen Shared Library Management Routines
The dlgetname Routine
Retrieves the name of a load module given a load module descriptor.
Syntax
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);
Parameters
Parameter Description
desc A buffer of memory allocated by the user program. The dynamic
loader fills this in with module information.
desc_size Size in bytes of the desc buffer.
read_tgm_mem A pointer to a function used by dlmodinfo to retrieve needed
information.
If the value is NULL, the dynamic loader uses its own internal data
structures to find the correct load module and ignore the
ident_parm and load_map_parm parameters.
buffer A buffer supplied by dlmodinfo to read into.
ptr The virtual memory address to read from.
bufsiz The size of buffer in bytes.
ident The value of the ident_parm parameter to dlmodinfo.
ident_parm Only used to pass the fourth parameter to read_tgt_mem.
load_map_parm Only used when calling through read_tgt_mem. Contains the
starting address of the load map.