• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: RTLD_NEXT does not look into INSERTED_LIBRARIES
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: RTLD_NEXT does not look into INSERTED_LIBRARIES
      • From: Carlos Sánchez de La Lama <email@hidden>
References: 
 >RTLD_NEXT does not look into INSERTED_LIBRARIES (From: Carlos Sánchez de La Lama <email@hidden>)

  • Prev by Date: Re: SMARTQuery Sample Broken on 10.7
  • Next by Date: Re: RTLD_NEXT does not look into INSERTED_LIBRARIES
  • Previous by thread: RTLD_NEXT does not look into INSERTED_LIBRARIES
  • Next by thread: Re: RTLD_NEXT does not look into INSERTED_LIBRARIES
  • Index(es):
    • Date
    • Thread