module loading problem

mxk@russiamail.com
Wed, 6 Jan 1999 08:41:43 -0500 (EST)


> root@linux ~/xtt/ make clean
> rm -f *.o *~ core
> root@linux ~/xtt/ make
> gcc -D__KERNEL__ _DMODULE -O -Wall -I/usr/include -c driver.c -o driver.o
> gcc -D__KERNEL__ _DMODULE -O -Wall -I/usr/include -c xttmd.c -o xttmd.o
> make xtt.o
> make[1]: Entering directory `/root/xtt'
> ld -r driver.o xttmd.o -o xtt.o
> make[1]: Leaving directory `/root/xtt'
> root@linux ~/xtt/ insmod xtt.o
> xtt.o: unresolved symbol printk
> root@linux ~/xtt/ insmod -V
> insmod version 2.1.121

> cat /proc/ksyms | grep print
> c0113580 printk_Rsmp_dd132261
> c01b85b8 sprintf_Rsmp_3c2c5af5
> c01b81a4 vsprintf_Rsmp_13d9cea7

Hi, I am trying to write (for the first time) a device handling module for a new xerox printer (212/214 series) and i've come across this problem once i upgraded to the 2.2.0-pre series. I've read everything I could find about the new modutils for 2.1.x but it still does not work. Loadable module support is turned on in the kernel, modutils are new, every utility from the Doc/CHANGES is of appropriate versions, and printk is in /proc/ksyms, but I can't link any of the modules to the kernel. I've tried everything short of ld'ing my 20 line program to the .o files in /usr/src/linux/kernel. The weird part is that my program worked fine in 2.0.36 RH52. And there really isn't anything complex in my program as I am just trying to detect the device and quit. I even tried cutting out the whole program except for the one-line printk() call, but with same effect.

I know that it must be something really simple, so excuse the possible triviality of this message, but as I would like to start poking around in the kernel and I guess this is the place to talk about my problems if I am stumped. Please "Cc: mxk@russiamail.com" if you respond.

TIA,
Mike.

----------------------------------------------------------------
Get your free email from AltaVista at http://altavista.iname.com

-
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/