Error while compiling a multiple files module : no symbol in a .o file

  • Thread starter Thread starter Shadew
  • Start date Start date
S

Shadew

Hello,

I'm trying to compile several files to build a kernel module. Here is the code of the Makefile :

obj-m := gntringevt.o
gntringevt-y := gntring3.o evtchn_functions.o

all :
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

I already compiled single-file modules and it went ok, but here I get error messages such as :
WARNING: "evtchn_unbind_from_user" [/home/fremals/xencomm/CommXen/gntringevt.ko] undefined!

This undefined function is in evtchn_functions.c. I ran "nm" on the files gntring3.o and evtchn_functions.o. For gntring3.o, all function and variable symbols are there, but there are no symbols in evtchn_functions.c (that explains why the module can't find the functions used in gntring3.o).

Here is the code of evtchn_unbind_from_user :
Code:
static void evtchn_unbind_from_user(struct per_user_data *u, int port, unsigned long *port_array)
{
int irq = irq_from_evtchn(port);

unbind_from_irqhandler(irq, (void *)(unsigned long)port);

set_port_user(port, NULL, port_array);
}
Do you know where is my mistake ?

Best regards

Continue reading...
 
Back
Top