Crash in loader due to bad initialization functions pointers
Crash in loader due to bad initialization functions pointers
- Subject: Crash in loader due to bad initialization functions pointers
- From: Pierre Baillargeon <email@hidden>
- Date: Thu, 29 Nov 2007 14:17:27 -0500
'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:
This email sent to email@hidden