/*hello.c*/
#include <linux/kernel.h>
#include <linux/module.h>
int init_module()
{
printk("hello, world\n");
return 0;
}
void cleanup_module()
{
printk("bye module\n");
}
이렇게 간단한 프로그램을 컴파일 시켰더니...
#gcc -D__KERNEL__ -D_LINUX -DMODULE -c -O2 hello.c
In file included from hello.c:2:
/usr/include/linux/module.h:60: parse error before 'atomic_t'
/usr/include/linux/module.h:60: warning: no semicolon at end of struct or union
/usr/include/linux/module.h:60: warning: no semicolon at end of struct or union