Re: link state missing error on 10.6
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Thanks for highlighting that code; it's pointed me to the origin of the problem. I'll have to consult with another engineer on the best solution, but it looks tractable. Nik Gervae Kext Management Engineer Apple, Inc. On 27 Jan, 2010, at 14:07 , 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 _______________________________________________ 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/ngervae%40apple.com
This email sent to ngervae@apple.com
_______________________________________________ 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
participants (1)
-
Nik Gervae