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: __attribute__((constructor)) in dylib does not run with DYLD_INSERT_LIBRARIES



On 28/2/05 11:58 pm, Brian Dantes <email@hidden> wrote:

> If this were a static library, you certainly would expect any static
> constructors to run that were defined in that library. The only difference
> in that scenario and this one is when the library is loaded into the image.
> I would hazard to say that Linux (and FreeBSD, HPUX, Solaris and other

It would be surprising if Linux behaved differently from FreeBSD and
Solaris, because they all use ELF. Some versions of HP-UX use ELF too.

So your "weight of numbers" is only really 1 :-(

> variants I've directly tried this on) are correct and MacOS X is not.
> 
> I have submitted this as Radar bug report to Apple as well, so we'll see if
> anything comes of that.

Also check the archives of this list, as this subject has kind of come up
before. (Mostly wrt C++ constructors, but it sounds like the same sort of
thing.)

Cheers,

Chris


 _______________________________________________
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: 
 >Re: __attribute__((constructor)) in dylib does not run with DYLD_INSERT_LIBRARIES (From: Brian Dantes <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.