linking .o files built in user space against kernel module using kbuild
I have a relocatable obj file built in user space which does not depennd on any kernel symbols.
I want to build a kernel module which needs to call the APIs defined in the .o file(user-space). I am able to link it with warning ".filename.o.cmd" missing.
Now when I want to insmod the .ko file, it gives the following message.
overflow in relocattion type 10 val ffffffff8835fc10
"module" likely not compiled with -mcmodel=kernel
Waiting for your replies.Thanks a lot.
1. It doesn't, of course, matter where you build your module.
2. It matters very much, however, that a kernel module be specially built *as* a kernel module. Here is a link on compiling kernel modules:
3. It's also essential that you *not* call user-space runtime library functions (like "printf()") from a kernel module.
|All times are GMT -5. The time now is 03:37 PM.|