This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

operation and limitations of dladdr()?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]