未找到符号 - IOUSBHostHIDDevice - OSX kext

时间:2016-04-19 07:19:16

标签: xcode bluetooth usb osx-elcapitan kernel-extension

我必须将现有的驱动程序转换为OSx10.11(Previous Question)。

我已将已弃用和已删除的类和方法替换为10.11中引入的新类和方法。现在kext已成功构建但无法加载驱动程序。

发出命令OSBundleLibrarieskextlibs -xml driver.kext已更新。

<key>OSBundleLibraries</key>
    <dict>
        <key>com.apple.driver.IOBluetoothHIDDriver</key>
        <string>4.4d69</string>
        <key>com.apple.driver.usb.IOUSBHostHIDDevice</key>
        <string>1.0</string>
        <key>com.apple.iokit.IOHIDFamily</key>
        <string>2.0</string>
        <key>com.apple.iokit.IOUSBHostFamily</key>
        <string>1.0</string>
        <key>com.apple.kpi.bsd</key>
        <string>15.0</string>
        <key>com.apple.kpi.iokit</key>
        <string>15.0</string>
        <key>com.apple.kpi.libkern</key>
        <string>15.0</string>
        <key>com.apple.kpi.mach</key>
        <string>15.0</string>
    </dict>

此外,向-all提供kextlibs表示未找到20个符号。请在下面找到该命令的相关部分结果。

22 symbols not found in any library kext:
__ZN18IOUSBHostHIDDevice28_RESERVEDIOUSBHostHIDDevice5Ev
__ZN18IOUSBHostHIDDevice29_RESERVEDIOUSBHostHIDDevice17Ev
__ZN18IOUSBHostHIDDevice28_RESERVEDIOUSBHostHIDDevice0Ev
__ZN18IOUSBHostHIDDevice29_RESERVEDIOUSBHostHIDDevice14Ev
__ZN18IOUSBHostHIDDevice28_RESERVEDIOUSBHostHIDDevice9Ev
__ZN18IOUSBHostHIDDevice29_RESERVEDIOUSBHostHIDDevice11Ev
__ZN18IOUSBHostHIDDevice28_RESERVEDIOUSBHostHIDDevice4Ev
__ZN18IOUSBHostHIDDevice29_RESERVEDIOUSBHostHIDDevice18Ev
__ZN18IOUSBHostHIDDevice28_RESERVEDIOUSBHostHIDDevice8Ev
__ZN18IOUSBHostHIDDevice29_RESERVEDIOUSBHostHIDDevice15Ev
__ZN18IOUSBHostHIDDevice28_RESERVEDIOUSBHostHIDDevice3Ev
__ZN18IOUSBHostHIDDevice29_RESERVEDIOUSBHostHIDDevice12Ev
__ZN18IOUSBHostHIDDevice28_RESERVEDIOUSBHostHIDDevice7Ev
__ZN18IOUSBHostHIDDevice29_RESERVEDIOUSBHostHIDDevice19Ev
__ZN18IOUSBHostHIDDevice28_RESERVEDIOUSBHostHIDDevice2Ev
__ZN18IOUSBHostHIDDevice29_RESERVEDIOUSBHostHIDDevice16Ev
__ZN20IOBluetoothHIDDriver31_RESERVEDIOBluetoothHIDDriver12Ev
__ZN18IOUSBHostHIDDevice29_RESERVEDIOUSBHostHIDDevice13Ev
__ZN20IOBluetoothHIDDriver31_RESERVEDIOBluetoothHIDDriver11Ev
__ZN18IOUSBHostHIDDevice28_RESERVEDIOUSBHostHIDDevice6Ev
__ZN18IOUSBHostHIDDevice28_RESERVEDIOUSBHostHIDDevice1Ev
__ZN18IOUSBHostHIDDevice29_RESERVEDIOUSBHostHIDDevice10Ev

kextutil提供了以下输出

sudo kextutil -n -print-diagnostics prdt.kext
kxld[com.comp.driver.prdt]: The super class vtable 'vtable for IOBluetoothHIDDriver' for vtable 'vtable for com_MadCatz_driver_bt_RATTe' is out of date. Make sure your kext has been built against the correct headers.
kxld[com.comp.driver.prdt]: The super class vtable 'vtable for IOBluetoothHIDDriver' for vtable 'vtable for com_MadCatz_driver_bt_RATTe' is out of date. Make sure your kext has been built against the correct headers.
kxld[com.comp.driver.prdt]: The vtable for com_comp_driver_usb_prdt was not patched because its parent, the vtable for IOUSBHostHIDDevice, was not found.
Link failed (error code 5).
Check library declarations for your kext with kextlibs(8).

应该采取什么措施来纠正缺失的符号?如何找到符号所在的位置?

任何与此问题有关的想法都受到高度赞赏,因为我无法弄清楚如何继续。

此外,__ZN1828_等在__ZN18IOUSBHostHIDDevice28_RESERVEDIOUSBHostHIDDevice5Ev中代表什么?有没有办法跟踪未知符号所在的代码行

编辑

******以添加其他信息******

其他信息

kextlibs结果(上面列出的)中删除和排序缺失的符号

IOUSBHostHIDDevice::_RESERVEDIOUSBHostHIDDevice0();
IOUSBHostHIDDevice::_RESERVEDIOUSBHostHIDDevice1();
IOUSBHostHIDDevice::_RESERVEDIOUSBHostHIDDevice2();
.
.
.
IOUSBHostHIDDevice::_RESERVEDIOUSBHostHIDDevice17();
IOUSBHostHIDDevice::_RESERVEDIOUSBHostHIDDevice18();
IOUSBHostHIDDevice::_RESERVEDIOUSBHostHIDDevice19();
IOBluetoothHIDDriver::_RESERVEDIOBluetoothHIDDriver11();
IOBluetoothHIDDriver::_RESERVEDIOBluetoothHIDDriver12();

似乎RESERVEDIOUSBHostHIDDevice

中声明了IOKit/usb/IOUSBHostHIDDevice.h(上面列出的)
//From IOUSBHostHIDDevice.h
// Protected pad slots for future expansion
OSMetaClassDeclareReservedUnused(IOUSBHostHIDDevice, 0);
OSMetaClassDeclareReservedUnused(IOUSBHostHIDDevice, 1);
OSMetaClassDeclareReservedUnused(IOUSBHostHIDDevice, 2);
.
.
// Public pad slots for future expansion
OSMetaClassDeclareReservedUnused(IOUSBHostHIDDevice, 10);
.
.
OSMetaClassDeclareReservedUnused(IOUSBHostHIDDevice, 19);

RESERVEDIOBluetoothHIDDriverIOBluetoothHIDDriver.h中声明了

OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 0 );
OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 1 );
.
.
.
OSMetaClassDeclareReservedUnused( IOBluetoothHIDDriver, 19 );

已声明有趣的是,只有_RESERVEDIOBluetoothHIDDriver11()_RESERVEDIOBluetoothHIDDriver12()是唯一与内核不匹配的方法,即使在{{1}中声明了1到19 }。

其中IOBluetoothHIDDriver.h是在OSMetaClassDeclareReservedUnused中声明为

的宏
OSMetaClass.h

0 个答案:

没有答案