문제

I have a exported functions foo() and foo1() from a.ko (a kernel module), foo1() takes input parameter, a function pointer. I invoke foo1() from b.ko, and pass foo() as the input parameter.

I see a insmod failure for b.ko (unknown symbol foo ), even though a.ko has been insmoded before b.ko.

Any explanations/solutions ?

Thanks, Lucky

도움이 되었습니까?

해결책

There are two ways to solve this, 1) Compile both the kernel modules in the same Makefile i.e. objs-m := a.o b.o. 2) Include **KBUILD_EXTRA_SYMBOLS=<"absolute path to the Module.symvers of the kernel module which is exporting function or variable"> in the Makefile of the kernel module which will use exported function or variable.

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