Re: Exporting kext symbol
Re: Exporting kext symbol
- Subject: Re: Exporting kext symbol
- From: Sudarshan S <email@hidden>
- Date: Wed, 24 Feb 2010 03:01:33 -0800 (PST)
I modified plists to include dependencies and added version information. Second kext fails to load by saying 'No valid version of this dependency can be found' for Library kext identifier.
Here is what I did for first kext (Library kext):
Set CFBundleVersion to 1.0
Set OSBundleCompatibleVersion to 1.0
Set MODULE_VERSION for this target to 1.0
For second kext that depends on this library:
Add library kext's bundle identifier in OSBundleLibraries dictionary with version
dependency of 1.0
Everywhere I have used 1.0 as a version and still kextload is failing to match. I also verified the version of library kext using kextstat and it is displayed as 1.0.
Thanks,
Leo
From: Dean Reece <email@hidden>
To: Sudarshan S <email@hidden>
Cc: darwin-kernel apple <email@hidden>
Sent: Tue, February 23, 2010 1:56:34 PM
Subject: Re: Exporting kext symbol
The kext that is importing the symbol must list your library kext as a dependency via the OSBundleLibraries property.
Also, the kext that is exporting the symbols must declare itself a library by including an OSBundleCompatibleVersion property, which specifies the lower bound of a binary-compatibility range (OSBundleVersion specifies the upper bound of the range).
Cheers,
- Dean
On Feb 23, 2010, at 12:07 AM, Sudarshan S wrote:
After
including _kmod_info into exported list, I could load kext. Now I am hitting the next hurdle of using these exported symbols in other kext. The second kext that is calling APIs of first kext fails to load saying 'Undefined symbols'. Not sure how symbols are are resolved during load time.
Thanks,
Leo
From: Shantonu Sen <email@hidden>
To: Sudarshan S <email@hidden>
Cc: darwin-kernel apple <email@hidden>
Sent: Mon, February 22, 2010 6:02:15 PM
Subject: Re: Exporting kext symbol
Did you include _kmod_info as an exported symbol? This created by Xcode for you, and needed to provide metadata about your kext to the kernel.
Shantonu
Sent from my MacBook
On Feb 22, 2010, at 3:46 AM, Sudarshan S wrote:
I am trying to export a symbol from a kext so that so that other kexts can use it. I tried to export APIs through EXPORTED_SYMBOLS_FILE Xcode option. When I try to load the kext, I get following error - "kextload. kld_lookup("_kmod_info") failed for module <kextpath>"
I verified the kext using "nm" to see if the symbols are properly exported and those symbols are marked as "(__TEXT,__text) external".
Regards,
Leo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden