/*foo.c - module*/
#include "foo.h "
init_module {
func1();
func2();
}
void cleanup_module { }
-----------------------------------------------
/* func.c- function definitions*/
func1() { }
func2() { }
EXPORT_SYMBOL(func1)
EXPORT_SYMBOL(func2)
-----------------------------------------------
/* foo.h - header */
extern func1();
extern func2();
---------------------------------------------
I have a Makefile like this
#Makefile
obj-m += foo.o
foo-objs := foo.o func.o
export-objs := func.o
obj-m += func.o
This is not probably what you want.
obj-m := test.o
test-objs := foo.o func.o
should do.
Anand
When I do "make" , I have my foo.o and func.o compiled. But, when I do
$insmod ./foo.o it says :
undefined reference to func1();
undefined reference to func2();
Why are the 2 functions(in func.o) still not being linked to my foo.o. Please help.
thanks
arun
--
"There are 10 people in the world - those who understand binary and those who dont !"