Android : how to expose API in kernel .... getting linker error

on Wednesday, August 13, 2014


How to expose an API in kernel (I am working on Android)? Somehow the following does not work....



  1. I did EXPORT_SYMBOL(module1_func) in module1.c

  2. did "extern module1_func();" in header file - module1.h (placed the header file in ''kernel/include/linux')

  3. In module2.c, I did "#include " & called the function "module1_func()"


FYI: module1.c is in 'kernel/security/' AND module2.c is in 'kernel/mm'


After compilation I am getting the following error. BTW I did clean build, still the same.. Please suggest!!




kernel/mm/built-in.o: In function get_param': :(.text+0x75c0): undefined reference tomodule1_func' make: * [.tmp_vmlinux1] Error 1


0 comments:

Post a Comment