site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On Jan 27, 2010, at 2:07 PM, Rick Macklem wrote:
On Wed, 27 Jan 2010, Michael Eddington wrote:
Lets forget for a second that I mentioned nsysent. We have what looks like broken functionality between 10.5 and 10.6. A kext that uses com.apple.kernel as it's dependencies will pass the initial checks for kext loading, try to be loaded and then the loader will bail out when it finds a null pointer.
Here is the code I found for OSKext.cpp that issues the error message.
From OSKext::loadExecutable():
if (isKernelComponent()) { OSData * kernelLinkState = OSKext::getKernelLinkState(); kxlddeps[0] = (u_char *)kernelLinkState->getBytesNoCopy(); } else for (i = 0; i < num_kxlddeps; i++) { OSKext * dependency = OSDynamicCast(OSKext, dependencies->getObject(i)); if (!dependency->linkState) { // xxx - maybe we should panic here OSKextLog(this, kOSKextLogErrorLevel | kOSKextLogLoadFlag | kOSKextLogLinkFlag, "Can't load kext %s - link state missing.", getIdentifierCString()); goto finish; } kxlddeps[i] = (u_char *)dependency->linkState->getBytesNoCopy(); assert(kxlddeps[i]); }
-mike Just fyi, my open source NFSv4 client that works for Leopard (http://code.google.com/p/macnfsv4) can't be ported to Snow Leopard until the above bug is fixed (or there is a way to load a Kext against com.apple.kernel). My current attempt fails with the "... link state missing" as above.
Rick, I strongly encourage you to switch to the KPI dependency model. While binary compatibility dictates that com.apple.kernel should work for 32-bit kexts on Snow Leopard, we do not and will not support it for 64-bit kexts. kextlibs(8) is a good tool to help you make the transition. If you need a kernel symbol that is not available in the KPIs, please file a bug. -Andrew _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com