HP-UX Reference (11i v1 05/09) - 3 Library Functions A-M (vol 6)

d
dladdr(3C) dladdr(3C)
RETURN VALUE
If the specified address does not fall within one of the load modules,
0 is returned; the contents of the
Dl_info structure are not modified. Otherwise, a non-zero value is returned and the fields of the
Dl_info structure are set.
DIAGNOSTICS
If no symbol is found within the load module containing address whose value is less than or equal to
address, the dli_sname, dli_saddr, and dli_size fields are set to
0; the dli_bind field is set to STB_LOCAL ,
and the dli_type field is set to
STT_NOTYPE .
For
a.out’s, only a subset of externally visible symbols are typically exported: specifically those refer-
enced by the load modules with which the
a.out is linked. The exact set of exported symbols for any
shared library or the
a.out can be controlled using the linker (see ld(1)).
ERRORS
If
dladdr() fails, a subsequent call to
dlerrno() returns one of the following values:
[RTLD_ERR_BAD_DLL] Invalid symbol address in load module.
[RTLD_ERR_NO_MEMORY] Out of memory.
[RTLD_ERR_CANT_APPLY_RELOC]
Cannot apply relocation in library.
[RTLD_ERR_SIGINHIBIT_FAILED]
siginhibit failed on entry to dladdr().
[RTLD_ERR_SIGENABLE_FAILED]
sigenable failed on exit from dladdr() .
[RTLD_ERR_SETCANCELSTATE_FAILED]
__thread_setcancelstate
failed on entry to or exit from
dladdr().
[RTLD_ERR_DLADDR_NOTFOUND]
Address not found in any load module.
SEE ALSO
cc(1), ld(1), sh(1), exec(2), dlclose(3C), dlerrno(3C), dlerror(3C), dlsym(3C).
Texts an d Tu tor ials
HP-UX Linker and Libraries Online User Guide
(See the +help option)
HP-UX Linker and Libraries User’s Guide
(See manuals(5) for ordering information)
Section 3150 Hewlett-Packard Company 2 HP-UX 11i Version 1: September 2005