dlsym() annoyance
Zack Weinberg
zack@rabi.phys.columbia.edu
Tue Sep 1 14:34:00 GMT 1998
If I call dlsym(NULL, "sym") and sym is a function in libc that's referred
to directly in the program, dlsym returns an address in the PLT, same as
writing ptr = sym. If sym is not referred to directly, I get the actual
address inside the shared library. Is there any way to force dlsym to give
me the real address in all cases? (This is for testing purposes, so I don't
mind calling internal entry points.)
Also, is there any way to get the text size of an arbitrary function from
within the program?
zw
More information about the Libc-hacker
mailing list