dlsym interposition question
dlsym interposition question
- Subject: dlsym interposition question
- From: email@hidden
- Date: Thu, 03 Oct 2013 19:23:32 -0400
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden