Mailing Lists: Apple Mailing Lists

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

Crash in loader due to bad initialization functions pointers



'm doing development work on Leopard (10.5) using the Intel C++ compiler and I've come accross the following problem when building dynamic library (dylib):

The loader (dyld) crashes at runtime when starting a test program suign the built dylib when it runs initialization function for static variables, in ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int).

I've been able to diagnose the problem by using a combination of DYLD_PRINT_INITIALIZERS and otool -s __DATA __mod_init_func. The problem is that this dylib section contains pointers that are invalid (Usually things like 0x4d000000 or 0x75000000). Now it might very well be the intel compiler that is causing the problem, but the same compiler on 10.4 works. I suspect a bad interaction between the linker (ld) and the object files generated by the Intel compiler.

Is this known? Is there a work-around?

(I've try as a last-ditch effort to use the 10.4 ld on 10.5, but the format of the system libraries changed (there are new section types) so the 10.4 ld cannot be used on 10.5.)

--
Pierre Baillargeon




_______________________________________________ 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


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.