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: Carlos Sánchez de La Lama <email@hidden>
- Date: Fri, 17 Feb 2012 10:15:17 +0100
Hi Peter,
Thanks a lot, I have it working now (as I said by linking against original libraries) but this looks much better.
Thanks a lot,
Carlos
El 17/02/2012, a las 00:53, Peter O'Gorman escribió:
> 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