Messages in this thread | | | Date | Thu, 21 Jan 1999 17:16:01 +0000 (GMT) | From | Matthew Kirkwood <> | Subject | Re: Kernel modules in 2.1/2.2.. |
| |
On Thu, 21 Jan 1999, Nicholas M. Kirsch wrote:
> 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/
| |