Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c

kernel

insmod

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?

like image 684
Moirisa Dikaiosýni Avatar asked Jan 24 '26 13:01

Moirisa Dikaiosýni


1 Answers

test() is static.

so you cannot export static functions.

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

like image 164
Jeyaram Avatar answered Jan 26 '26 03:01

Jeyaram



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!