> I just purchased O'Reilly publishing's book Linux Device Drivers, and none
> of the simple examples will work. They come back with an unresolved symbol
> for printk.
I suspect that your kernel is compiled with CONFIG_MODVERSIONS. Run
$ grep printk /proc/ksyms
and you'll probably see some gobbledegook after it.
> Compile command is :
> cc -D__KERNEL__ -DMODULE -c hello.c -o hello.o
>
> It compiles fine, but insmod and depmod both find the unresolved symbols.
>
> No examples show what I need to link with or define in order for it to
> work. The book is only updated to kernel version 2.1.43..
You've basically done the right thing. Your kernel is a little funny,
though.
If you can, rebuild the kernel without module versioning and try again.
Alternatively, adding -DMODVERSIONS after -DMODULE might do the trick.
Matthew.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/