site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=uA6ZHhyLrqlPpWqvTqW+umU7p6ECCEQxVPyzll+tcDfSLYsuEg+IfZ6GJxg+r5SFkRyCZ2e7X/KeJ15kO9TN0lOvkCW3qyO0ZsVDSZsTtjuy9zJu/iGT8wY4AxV75CldibBMS9occsT/ngZImkDDSdJ4xp65ox3LXQzMMGPM7kk= // 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(); } Cédric Lutthi _______________________________________________ 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... 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(); 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. This email sent to site_archiver@lists.apple.com
participants (1)
-
Cedric Luthi