lkml.org 
[lkml]   [1999]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectcan't access kernel with device driver module
Hi,

I added a file (robin.c) with a varible (robactive) to the kernel
network
code and want to change its value and output other kernel data
(rob_head).
So I wrote a char device-driver module (robindevice.c), but when I try
to
insmod robindevice.o it, I get the message:
robindevice: "unresolved symbol robactive".


Sources:
kernel:
/usr/src/linux-2.2.10-robin/include/net/robin.h
... struct ratenglied{...}; ...

net/ipv4/robin.c
... #include <net/robin.h>
int robactive = 1;
struct ratenglied *rob_head=NULL; ...


module:
/Robin/DeviceDriver/robindevice.c
... #include "/usr/src/linux-2.2.10-robin/include/net/robin.h"
extern int robinactive;
extern struct ratenglied *rob_head; ...

/Robin/DeviceDriver/Makefile
... CC = gcc
MODCFLAGS := -O -Wall -Wstrict-prototypes -DMODULE -D__KERNEL__
TARGET = robindevice
SOURCES = robindevice.c
OBJECTS = $(SOURCES:%.c=%.o)
all: $(TARGET).o
$(TARGET).o: $(SOURCES) /usr/include/linux/version.h
$(CC) $(MODCFLAGS) -c $(SOURCES)


I found an entry robinactive in /usr/src/linux-2.2.10/System.map.

(I added 'int robinactive=1;' to robin.h and made it extern in robin.c,
no problem to insmod the driver, but then it only used a copy; printk
showed two different values in kernel and module.)

Why is robinactive a unresolved symbol, what have I to do, so that I
can use the char driver module to read and write data to kernel
variable and structures?

Thanks,

Guido

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

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.024 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site