Simon Richter writes:
Hi,On Sun, Dec 06, 2009 at 08:52:52AM -0500, Sam Varshavchik wrote:My wrapper needs to find the real socket() and connect(). I haven't checked this yet, but I suspect that since my shared library was loaded ahead of libc, after lt_dlopen(NULL), using lt_dlsym() will simply return a pointer to my own symbols, rather than libc's.Right. dlsym(RTLD_NEXT, "open") will give you the one that you shadowed; this might not be the real symbol yet as there may be other wrappers loaded, and it might not be the one from libc as applications are allowed to provide their own definitions of symbols and have them take precedence.
That looks like what I'm looking for. I don't seem to find an analogous flag for lt_dlsym, in libtool's documentation, so I'll go with native dlsym, then.
pgpYA9MiE57Fl.pgp
Description: PGP signature
_______________________________________________ http://lists.gnu.org/mailman/listinfo/libtool