Compiling Kernel Modules - Linux Documentation Project
tldp.org › LDP › lkmpgCompiling Kernel Modules Kernel modules need to be compiled with certain gcc options to make them work. In addition, they also need to be compiled with certain symbols defined. This is because the kernel header files need to behave differently, depending on whether we're compiling a kernel module or an executable.