operation and limitations of dladdr()?
Britton Kerin
britton.kerin@gmail.com
Tue Mar 29 20:27:00 GMT 2016
I'm trying to learn as much as possible about dladdr() before
unleashing a small lib that uses it on the world. Two questions:
Does the fact that dladdr() reports the symbol with the nearest
address lower than the given
one mean that that might be the correct function? In other words why this:
const char *dli_sname; /* Name of nearest symbol with address
lower than addr */
void *dli_saddr; /* Exact address of symbol name in dli_sname */
I would have thought that the address of the function about to be
executed would have to match the library address exactly, but maybe
not. What does it mean if they don't match? My current
strategy is to be cowardly and not tell the user that the correct
function has been found unless
I get an exact match.
Thanks,
Britton
More information about the Libc-help
mailing list