Crash in loader due to bad initialization functions pointers
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Is this known? Is there a work-around? -- Pierre Baillargeon _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... '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. (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.) This email sent to site_archiver@lists.apple.com
participants (1)
-
Pierre Baillargeon