dyld sources vs dyld binaries
dyld sources vs dyld binaries
- Subject: dyld sources vs dyld binaries
- From: Cedric Luthi <email@hidden>
- Date: Sat, 17 Jun 2006 00:06:16 +0200
Here is an excerpt of a backtrace on a call to
NSCreateObjectFileImageFromMemory (ran on Mac OS X 10.4.6 ppc)
You can clearly identify that compatibilityChecks is called inside
the ImageLoaderMachO constructor.
1 dyld 0x8fe1168c
ImageLoaderMachO::compatibilityChecks(ImageLoader::LinkContext
const&) + 316
2 dyld 0x8fe12ddc ImageLoaderMachO::ImageLoaderMachO
[in-charge](char const*, mach_header const*, unsigned long long,
ImageLoader::LinkContext const&) + 224
3 dyld 0x8fe05af4 dyld::loadFromMemory(unsigned char
const*, unsigned long long, char const*) + 996
4 dyld 0x8fe0860c NSCreateObjectFileImageFromMemory +
120
5 libSystem.B.dylib 0x9017dca0 NSCreateObjectFileImageFromMemory +
104
Here is the source from http://www.opensource.apple.com/darwinsource/
10.4.6.ppc/
// create image by copying an in-memory mach-o file
ImageLoaderMachO::ImageLoaderMachO(const char* moduleName, const
struct mach_header* mh, uint64_t len, const LinkContext& context)
: ImageLoader(moduleName)
{
// clean slate
this->init();
// temporary use this buffer until TEXT is mapped in
fMachOData = (const uint8_t*)mh;
// create segments
this->instantiateSegments((const uint8_t*)mh);
// map segments
if ( mh->filetype != MH_EXECUTE )
ImageLoader::mapSegments((const void*)mh, len, context);
// get pointers to interesting things
this->parseLoadCmds();
}
So, why is the binaries different from the sources ? Any idea ?
Grepping the dyld sources for "compatibilityChecks" returned no
result either. I'm really surprised.
Cédric Lutthi _______________________________________________
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