• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
dyld sources vs dyld binaries
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: dyld sources vs dyld binaries
      • From: Eric Albert <email@hidden>
  • Prev by Date: Apple Libtool
  • Next by Date: Re: dyld sources vs dyld binaries
  • Previous by thread: Re: Apple Libtool
  • Next by thread: Re: dyld sources vs dyld binaries
  • Index(es):
    • Date
    • Thread