init_module(), cleanup_module()로 잘 실행되는 샘플 모듈 프로그램을 module_init(), module_exit()로 바꾸어서 실행했더니 컴파일에서도 warning이 많이 나고.. 실행도 안되네여..
뭐가 문제일까여??
--> hello_init.c
int hello_init(void)
{
printk(KERN_ALERT "Hello, World\n");
return 0;
}
module_init(hello_init);
--> hello_exit.c
void hello_exit(void)
{
printk(KERN_ALERT "Goodbye\n");
}
module_exit(hello_exit);
소스 코드는 이렇구여..
make하면.. 아래와 같은 메시지가..
gcc -I/usr/src/linux-2.4/include -D__KERNEL__ -DMODULE -O -Wall -c -o hello_init.o hello_init.c