ckernelinsmod

Not able to insmod or use inter-kernel module(s)


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?


Solution

  • test() is static.

    so you cannot export static functions.

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