Unable to find symbol links for IOKit kext

1.2k views Asked by At

I followed this tutorial given on Apple's developer site.

On running kextlib, it's showing 2 undefined symbols , here is the output:

    sudo kextlibs -xml -undef IOKitTest1.kext/
    <key>OSBundleLibraries</key>
    <dict>
        <key>com.apple.kpi.iokit</key>
        <string>12.4</string>
        <key>com.apple.kpi.libkern</key>
        <string>12.4</string>
    </dict>

For x86_64:
    2 symbols not found in any library kext:
    __ZN9IOService15configureReportEP19IOReportChannelListjPvS2_
    __ZN9IOService12updateReportEP19IOReportChannelListjPvS2_

on running :

kextfind -dsym __ZN9IOService15configureReportEP19IOReportChannelListjPvS2_
nm -arch x86_64 /mach_kernel |grep __ZN9IOService15configureReportEP19IOReportChannelListjPvS2_

I get 0 hits , on piping the output to a file - i realize that the symbols im looking for are not even present here. And even if I do find them I have no idea how to link those symbols or find the corresponding libraries to my driver.

Any help will help. This is the first time I'm working on IOKit Drivers and no one seems to be having this error.

I'm running OSX 10.8.4 and Xcode 5 DP5

Thanks in advance !

1

There are 1 answers

0
pmdj On

Let's run the missing symbols through c++filt to demangle them:

$ echo __ZN9IOService15configureReportEP19IOReportChannelListjPvS2_ | c++filt 
IOService::configureReport(IOReportChannelList*, unsigned int, void*, void*)

$ echo __ZN9IOService12updateReportEP19IOReportChannelListjPvS2_ | c++filt
IOService::updateReport(IOReportChannelList*, unsigned int, void*, void*)

So it seems that we are looking for the methods IOService::configureReport and IOService::updateReport - presumably for use in the vtable in your IOService subclass.

Now, those methods don't exist on 10.8 or earlier, and 10.9/Xcode5 are still in closed beta, so you can't discuss them on a public forum like this. However, I suspect you're using the 10.9 SDK, and this might be a bug in the prerelease code. Make sure you're running the very latest SDK (cough DP6 cough) and if the problem still exists, (a) ask on Apple's beta forum and/or (b) file a bug report with Apple and/or (c) file a (paid) DTS request if it's urgent.