The
dladdr()
function
queries the dynamic linker for information about the shared object
containing the address
addr.
The information is returned in the structure specified by
info.
The structure contains at least the following members:
const char *dli_fname
|
The pathname of the shared object containing the address.
|
void *dli_fbase
|
The base address at which the shared object is mapped into the
address space of the calling process.
|
const char *dli_sname
|
The name of the nearest run-time symbol with a value less than or
equal to
addr.
When possible, the symbol name is returned as it would appear in C
source code.
If no symbol with a suitable value is found, both this field and
dli_saddr
are set to
NULL.
|
void *dli_saddr
|
The value of the symbol returned in
dli_sname.
|
The
dladdr()
function
is available only in dynamically linked programs.