LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux loadable kernel modules help (https://www.linuxquestions.org/questions/linux-newbie-8/linux-loadable-kernel-modules-help-716518/)

greplinux 04-03-2009 01:55 AM

Linux loadable kernel modules help
 
Hi All,

While building a loadable kernel module say for example sample.c, we get various files as a result of successful compilation:
1. sample.ko -- module
2. sample.mod.c
3. sample.o
4. built-in.o
5. sample.mod.o

Will you guys please explain their purpose (except sample.ko)?

Thanks,

Junior Hacker 04-03-2009 02:14 AM

Those files are required to put together the module, but because the Linux kernel is constantly evolving, they first need to be configured (created) with source headers matching the kernel version you want it to load onto. Normally the current running kernel.

Mara 04-03-2009 04:09 PM

.mod.c stores the module structure in one place.

synss 04-03-2009 04:39 PM

The kernel is written in C. The .o files are so-called object files. The object files can be linked to create an executable.

greplinux 04-06-2009 01:52 AM

Thank you all for your relies.


All times are GMT -5. The time now is 02:54 AM.