Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DYLD_INSERT_LIBRARIES and read()



On 13/03/2008, at 5:19 PM, stephen joseph butler wrote:


I have written an implementation of read(int, void*, size_t) that I
am trying to use via DYLD_INSERT_LIBRARIES. I have this working fine
on 10.4, but not on 10.5.

I have read http://lists.apple.com/archives/Darwin-dev/2007/Nov/
msg00061.html but am still not clear on what I need to do. A follow
up to that post mentions including a header. I can't seem to find any
detail on this header.


Look at the function prototype declaration in <unistd.h> on 10.5. You have to do yours the same way. Macros are defined in <sys/ cdefs.h>.



Thanks Stephen,

I tried and no dice.

I am compiling with …

gcc -dynamiclib -o mylib.dylib -fno-common -framework CoreFoundation - mmacosx-version-min=10.4 mysource.c

Do I need to add something to that?

Specifically, I think I need to provide all 3 symbols (_read, _read $UNIX2003 and _read$NOCANCEL$UNIX2003) for this to work.

Thanks again,

LD. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-dev/email@hidden

This email sent to email@hidden
References: 
 >DYLD_INSERT_LIBRARIES and read() (From: Luke Daley <email@hidden>)
 >Re: DYLD_INSERT_LIBRARIES and read() (From: "stephen joseph butler" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.