阅读:1150回复:0
怎么样调用我自己开放出的函数??
这是我的测试驱动程序代码:
#include <linux/module.h> #include <linux/kernel.h> #include <linux/devfs_fs_kernel.h> #include \"ssr01_10.h\"//该h文件包含Opendevice的定义 static int __init ktest_init(void) { unsigned int retval; void * handle; retval = Opendevice(&handle,0,0,1); if(retval) { printk(\"ktest::Opendevice Error:%d\\n\",retval); return 0; } printk(\"ktest::Opendevice Success\\n\"); return 0; } static void __exit ktest_exit(void) { printk(\"ktest::entry ktest_exit\\n\"); } module_init(ktest_init); module_exit(ktest_exit); MODULE_LICENSE(\"GPL\"); 其中:函数Opendevice在我的另一个驱动程序driver1中通过EXPORT_SYMBOL(Opendevice)导出的函数,当driver1加载后 在/proc/ksyms中都可以看到我导入的这个函数:c88b806c Opendevice_R__ver_Opendevice [driver1], 但我在把这个测试驱动程序加载时,它找不到函数链接Opendevice 高人:救救我吧!!!!!!!!!! |
|
最新喜欢:![]() |