linux – 加载内核模块时的未知符号

前端之家收集整理的这篇文章主要介绍了linux – 加载内核模块时的未知符号前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我需要帮助,了解为什么我插入模块时出错.我试过 this没有成功.
$sudo modprobe lpfc_scst 
FATAL: Error inserting lpfc_scst (/lib/modules/2.6.32-33-generic/extra/lpfc_scst.ko): Unknown symbol in module,or unknown parameter (see dmesg)

$dmesg | tail
[ 1201.262842] lpfc_scst: Unknown symbol scst_register_target
[ 1201.262949] lpfc_scst: Unknown symbol lpfc_tm_term
[ 1201.263161] lpfc_scst: no symbol version for scst_register_session
[ 1201.263164] lpfc_scst: Unknown symbol scst_register_session
[ 1201.263284] lpfc_scst: no symbol version for scst_rx_mgmt_fn
[ 1201.263286] lpfc_scst: Unknown symbol scst_rx_mgmt_fn
[ 1201.263395] lpfc_scst: no symbol version for scst_unregister_session
[ 1201.263398] lpfc_scst: Unknown symbol scst_unregister_session
[ 1201.263573] lpfc_scst: no symbol version for scst_rx_data
[ 1201.263575] lpfc_scst: Unknown symbol scst_rx_data

$cat /proc/kallsyms | grep scst_register_target
dffd2a10 r __ksymtab_scst_register_target   [scst]
dffd302e r __kstrtab_scst_register_target   [scst]
dffd2b34 r __kcrctab_scst_register_target   [scst]
dffd2a20 r __ksymtab___scst_register_target_template_non_gpl    [scst]
dffd3063 r __kstrtab___scst_register_target_template_non_gpl    [scst]
dffd2b3c r __kcrctab___scst_register_target_template_non_gpl    [scst]
dffd2c10 r __ksymtab___scst_register_target_template    [scst]
dffd308b r __kstrtab___scst_register_target_template    [scst]
dffd2de8 r __kcrctab___scst_register_target_template    [scst]
dff913a0 t __scst_register_target_template  [scst]
dff90dd0 T scst_register_target [scst]
dff91840 T __scst_register_target_template_non_gpl  [scst]

$

非常感谢.

解决方法

我已经解决了这个问题,如 this forum所示:

>编辑scst.
>将生成的Module.symvers附加到/lib/modules/\u0026lt;version\u0026gt;/build/Module.symvers(Hack.不知道为什么内核没有看到导出的符号).
>将scst复制到/ lib / modules /< version> / extra.
> depmod -a.
>编译lpfc_scst.
>插入模块lpfc_scst没有问题.

祝你今天愉快.

猜你在找的Linux相关文章