All pastes #89039 Raw Edit

Unnamed

public text v1 · immutable
#89039 ·published 2006-07-15 18:14 UTC
rendered paste body
PROGRAM:

#include <linux/init.h>
#include <linux/module.h>
MODULE_LICENSE("Dual BSD/GPL");

static int hello_init(void)
{
   printk(KERN_ALERT "HEllo, world!\n");
   return 0;
}

static void hello_exit(void)
{
   printk(KERN_ALERT "Goodbye, cruel world!\n");
}

module_init(hello_init);
module_exit(hello_exit);



COMPILATION AND ERRORS:

drasko@Lenin:~/ldd$ make -C /usr/src/linux M=`pwd` modules
make: Entering directory `/usr/src/kernel-headers-2.6.8-2-386'
  CC [M]  /home/drasko/ldd/hello.o
In file included from include/asm/thread_info.h:16,
                 from include/linux/thread_info.h:21,
                 from include/linux/spinlock.h:12,
                 from include/linux/capability.h:45,
                 from include/linux/sched.h:7,
                 from include/linux/module.h:10,
                 from /home/drasko/ldd/hello.c:2:
include/asm/processor.h:87: error: array type has incomplete element type
make[1]: *** [/home/drasko/ldd/hello.o] Error 1
make: *** [_module_/home/drasko/ldd] Error 2
make: Leaving directory `/usr/src/kernel-headers-2.6.8-2-386'
drasko@Lenin:~/ldd$