Re: RTLD_NEXT does not look into INSERTED_LIBRARIES
Re: RTLD_NEXT does not look into INSERTED_LIBRARIES
- Subject: Re: RTLD_NEXT does not look into INSERTED_LIBRARIES
- From: "Peter O'Gorman" <email@hidden>
- Date: Thu, 16 Feb 2012 17:53:03 -0600
On 02/10/2012 02:48 AM, Carlos Sánchez de La Lama wrote:
Hi all,
I am interposing some functions between an application and a framework,
by using DYLD_INSERT_LIBRARIES="enhancer:profiler", it does not work correctly. When using RTLD_NEXT on dlsym to access next symbol,
Hi,
I don't think anybody answered you?
Don't use dlsym with RTLD_NEXT or DYLD_FORCE_FLAT_NAMESPACE, look at:
http://opensource.apple.com/source/dyld/dyld-132.13/include/mach-o/dyld-interposing.h
And use that DYLD_INTERPOSE() macro. You can completely avoid using
dlsym, no need for flat namespace, and your replacement functions can
even be static.
Peter
_______________________________________________
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