문제

I have a function in kernel driver 1 (KD1.ko):

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

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

In Kernel driver 2 (KD2.ko):

extern static void test (void);

which I tried to call it.

I managed to insmod KD1.ko, but I was not able to insmod KD2.ko. Am I missing something?

도움이 되었습니까?

해결책

test() is static.

so you cannot export static functions.

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top