加载内核模块时输入未知符号 [英] Unknown symbol in while loading a kernel module

查看:181
本文介绍了加载内核模块时输入未知符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要帮助来理解为什么插入模块时会出现错误.我已经尝试过没有成功.

I need help understanding why I get an error when I insert a module. I have tried this with no success.

$ 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]

$

非常感谢.

推荐答案

我已经按照

  • 已编译scst.
  • 将生成的Module.symvers附加到现有的/lib/modules/<version>/build/Module.symvers中( hack.不知道为什么内核看不到导出的符号.)
  • scst复制到/lib/modules/<version>/extra.
  • depmod -a.
  • 已编译lpfc_scst.
  • 插入模块lpfc_scst没问题.
    1. Compiled scst.
    2. Appended the generated Module.symvers to existent /lib/modules/<version>/build/Module.symvers (Hack. Do not know why the kernel did not see the exported symbols).
    3. Copied the scst to /lib/modules/<version>/extra.
    4. depmod -a.
    5. Compiled lpfc_scst.
    6. Inserted module lpfc_scst with no problems.

    祝你有美好的一天.

    这篇关于加载内核模块时输入未知符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆