Re: link state missing error on 10.6
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=2YIqOu9sUXO66ctlm2u71m/rApRmV0LwjkntPlFb4d8=; b=R0WVVQJmPJBRuHD+qFrZ7IL9C9JGKedwUqV6SfrZMrw6dzmlhgzaeigcpoyo4/vxH9 tFQZg8taz6aujAjnZjH2inEIHw0AJj3rGA2O0Y26c4ng6LLbJxBbP4miQ3HA5I+hSfmG M7pWD0PxutYNYH7pOR4vV1VHhvqwDOpgIUALo= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=MwpL/aB/M1ei0HagvDI2fb1fXMOUouc0LdIdVmGx+4DwPlOhusiXCdxoFpN4lTdje4 9TGTQFex1o8kLZqEKphoS3zsSESQd8aB9827KV/qpmUU4OUzEw4RyaC3zfQld3KDziet p83kiV25yby6xVCzSJzaVY0W7YuuYK1Foe6CY= 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 On Tue, Jan 26, 2010 at 9:35 PM, Michael Smith <drivers@mu.org> wrote:
On Jan 26, 2010, at 2:55 PM, Michael Eddington wrote:
This only appears to happen when my OSBundleLibraries has "com.apple.kernel" "10.2.0" as the dependencies. If I just use, com.apple.kernel.bsd or something it will load fine. Sadly I need to depend on the full com.apple.kernel to resolve nsysent it looks like.
nsysent is only interesting if you are trying to patch the syscall table, which is not supported (or generally a good idea). = Mike -- Ars longa, vita brevis, occasio praeceps, experimentum periculosum, iudicium difficile -- Hippocrates
_______________________________________________ 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)
-
Michael Eddington