• 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: dlsym interposition question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dlsym interposition question


  • Subject: Re: dlsym interposition question
  • From: Stephen Checkoway <email@hidden>
  • Date: Sun, 06 Oct 2013 20:08:47 -0400

On Oct 6, 2013, at 6:29 PM, Ariel Burton <email@hidden> wrote:

> This also doesn't quite do what I'm after.
>
> How are you loading libfoo.dylib?  Are you linking it with your
> main program?  Are you loading it with dlopen?  Or are you
> perlaoding it with DYLD_INSERT_LIBRARIES?

Sorry, I didn't pay close enough attention to your actual question. Looking through the source for dyld, it isn't obvious how to avoid the interposed symbols:

From <http://www.opensource.apple.com/source/dyld/dyld-210.2.3/src/dyldAPIs.cpp> and <http://www.opensource.apple.com/source/dyld/dyld-210.2.3/src/ImageLoaderMachO.cpp>, dlsym() calls ImageLoaderMachO::getExportedSymbolAddress() which calls ImageLoaderMachO::getSymbolAddress() which checks the list of interposed symbols.

Similarly, the deprecated NSAddressOfSymbol() uses ImageLoaderMachO::getExportedSymbolAddress().

You could use the functions and data structures in mach-o/*.h to parse the various images and get the interposed symbol addresses, I suppose.

--
Stephen Checkoway






 _______________________________________________
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


References: 
 >dlsym interposition question (From: email@hidden)
 >Re: dlsym interposition question (From: Jonas Maebe <email@hidden>)
 >Re: dlsym interposition question (From: Greg Parker <email@hidden>)
 >Re: dlsym interposition question (From: Ariel Burton <email@hidden>)
 >Re: dlsym interposition question (From: Stephen Checkoway <email@hidden>)
 >Re: dlsym interposition question (From: Ariel Burton <email@hidden>)

  • Prev by Date: Re: dlsym interposition question
  • Next by Date: In-Kernel mach message receiving...
  • Previous by thread: Re: dlsym interposition question
  • Next by thread: In-Kernel mach message receiving...
  • Index(es):
    • Date
    • Thread