3

我在内核驱动程序 1 (KD1.ko) 中有一个函数:

static void test (void);
EXPORT_SYMBOL(test);

static void test() {
    printk("<<< MISSION DONE >>>.\n");
}

在内核驱动程序 2 (KD2.ko) 中:

extern static void test (void);

我试着叫它。

我设法 insmod KD1.ko,但我无法 insmod KD2.ko。我错过了什么吗?

4

1 回答 1

4

test()static

所以你不能导出静态函数。

http://osdir.com/ml/linux.kernel.kernelnewbies/2003-02/msg00149.html

于 2014-02-13T06:02:41.510 回答