Re: Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5
Re: Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5
- Subject: Re: Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5
- From: Peter O'Gorman <email@hidden>
- Date: Fri, 3 Apr 2009 22:56:57 -0500
Hi Alexander,
On Apr 3, 2009, at 8:11 PM, Alexander Samoylovich wrote:
DTrace shows my Safari uses
CPU ID FUNCTION:NAME
0 21552 getaddrinfo_async_start:entry
0 21553 getaddrinfo_async_handle_reply:entry
exactly like you have predicted :-)
DYLD_INSERT_LIBRARIES works the same on all OS versions.
Glad to hear it, I was curious, but not curious enough to check
myself :-).
Peter
On Apr 2, 2009, at 11:14 AM, Peter O'Gorman wrote:
Alexander Samoylovich wrote:
Hello.
I am trying to interpose getaddrinfo and freeaddrinfo functions. For
this purpose I use DYLD_INSERT_LIBRARIES environment variable.
The library source and the shell script to run an application to be
hooked are below.
This trick works for Mac OS X 10.4 for Safari, Firefox and curl. But
under Mac OS X 10.5 it works with Firefox and curl but not with
Safari.
For Safari the library hooks freeaddrinfo but not getarrdinfo. The
real
application also interposes connect and connect$UNIX2003 and works
for
all application and all OSes.
So the question:
Why DYLD_INSERT_LIBRARIES works differently on 10.4 and 10.5? Is
there
any way to force it to work the same way and to interpose
getaddrinfo too?
Are you sure that Safari calls getaddrinfo, and not
getaddrinfo_async*?
$ nm -g /usr/lib/libSystem.dylib | grep getaddrinfo
00067613 T _getaddrinfo
001144bf T _getaddrinfo_async_cancel
0004f75e T _getaddrinfo_async_handle_reply
001145f8 T _getaddrinfo_async_receive
001144da T _getaddrinfo_async_send
0004efda T _getaddrinfo_async_start
http://www.opensource.apple.com/darwinsource/10.5.6/Libinfo-278.0.3/lookup.subproj/netdb_async.h
--
Peter O'Gorman
http://pogma.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden