question on unresolved symbol and file operations?

Kirk Reiser (kirk@braille.uwo.ca)
01 Apr 1998 10:26:15 -0500


I have been trying to update a character driver which I wrote under
2.0.x as a module and have been having some difficulty compiling it as
kernel code. I get an unresolved symbol error on mydriver_write when
compiling the kernel. I get the error at the linking stage but the
compile is fine. I have run nm on mydriver.o and the symbols are
there and look correct so I'm not sure what is going on exactly. Is
there someplace in the kernel I have to prototype the various
functions? I have exported the functions in the file which call my
driver routines and get no errors or warnings from those routines so
I'm not sure where else to look to hunt down the problem. I will
attempt to include a section of the compile output here at the bottom.
I am working with 2.1.90.

On another note, is there somewhere I can get documentation on the new
file operation arguments in the 2.1.x kernels? I have noticed that
the inode pointer has been done away with and a fourth argument loff_t
pointer added. I can't exactly be sure what thist pointer is for. It
appears to be the file-position to the file pointer passed in but I'm
not sure why. I have checked a number of other drivers and the
Documentation directory and cannot find a clear explanation of the
operation arguments. The fs.h header doesn't seem to have any clear
comments that I can find either, so an explanation or pointer to some
docs would certainly be appreciated.

Kirk

make[2]: Entering directory `/usr/src/t-linux/drivers/char'
make all_targets
make[3]: Entering directory `/usr/src/t-linux/drivers/char'
gcc -D__KERNEL__ -I/usr/src/t-linux/include -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -D__SMP__ -pipe -fno-strength-reduce -m486 -malign-loops=2 -malign-jumps=2 -malign-functions=2 -DCPU=686 -D__SMP__ -c -o mydriver.o mydriver.c
rm -f char.a
ar rcs char.a selection.o misc.o tty_io.o n_tty.o tty_ioctl.o pty.o mem.o random.o mydriver.o console.o vt.o vc_screen.o consolemap.o consolemap_deftbl.o keyboard.o pc_keyb.o defkeymap.o rtc.o vga.o vesa_blank.o
make[3]: Leaving directory `/usr/src/t-linux/drivers/char'
make[2]: Leaving directory `/usr/src/t-linux/drivers/char'
ld -m elf_i386 -T /usr/src/t-linux/arch/i386/vmlinux.lds -e stext arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/main.o init/version.o \
arch/i386/kernel/kernel.o arch/i386/mm/mm.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
fs/filesystems.a \
net/network.a \
drivers/block/block.a drivers/char/char.a drivers/misc/misc.a drivers/net/net.a drivers/sound/sound.a drivers/pci/pci.a drivers/pnp/pnp.a \
/usr/src/t-linux/arch/i386/lib/lib.a /usr/src/t-linux/lib/lib.a /usr/src/t-linux/arch/i386/lib/lib.a \
-o vmlinux
drivers/char/char.a(console.o): In function `do_con_write':
console.o(.text+0x271e): undefined reference to `mydriver_write'
make: *** [vmlinux] Error 1

-- 

KirkReiser The Computer Braille Facility e-mail: kirk@braille.uwo.ca University of Western Ontario phone: (519) 661-3061

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu