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-inte... Peter _______________________________________________ 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 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.