dlsym interposition question
Hi, I have the following question regarding how interposition and name lookups using dlsym interact. I have the following components: interposer.dylib this interposes getpid using the __interpose section main a main module I can interpose the getpid in libSystem by using DYLD_INSERT_LIBRARIES to preload interposer.dylib. main does the following: libc_handle = dlopen ( "/usr/lib/libSystem.dylib", RTLD_LAZY ); assert ( libc_handle ); interposer_handle = dlopen ( "interposer.dylib", RTLD_LAZY ); assert ( interposer_handle ); libc_getpid = dlsym ( libc_handle, "getpid" ); interposer_getpid = dlsym ( interposer_handle, "getpid" ); The instance of getpid returned by dlsym on libc_handle is that in the interposer, and is the same as that returned for the interposer_handle. My question is this. How can I find the address of the definition of getpid that was interposed (i.e., the one in libSystem.dylib)? Thanks, Ariel Burton _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.app... This email sent to site_archiver@lists.apple.com
participants (1)
-
ariel.burton@roguewave.com