linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* (no subject)
@ 2005-03-05 10:11 Raffaele Ianniello
  2005-03-05 18:14 ` Randy.Dunlap
  0 siblings, 1 reply; 2+ messages in thread
From: Raffaele Ianniello @ 2005-03-05 10:11 UTC (permalink / raw)
  To: linux-kernel


I have a problem compiling a module that I am porting form 2.4 to 2.6 linux kernel.

Compiling with this Makefile:
 
DEBUG = y
 
KERNELDIR = /usr/src/linix.2.6.9
SUBDIR = $(KERNELDIR)/drivers/snoop
INCLUDEDIR = $(KERNELDIR)/include
 
obj-m := snoop.o
 
modules: $(MAKE) -C $(KERNELDIR) SUBDIR=$(SUBDIR) modules
 
clean:
        rm -f *.o
        rm -f *.ko

apperars some lines like:
***Warning: "snoop_ip_forward" [drivers/snoop/snoop] is COMMON symbol
***Warning: "snoop_ip_forward_finish" [drivers/snoop/snoop] is COMMON symbol
 
and I have insert in ip_forward.c some lines:
 
    extern int (* snoop_ip_forward_finish) (struct sk_buff *);

and this is in function ip_forward():
       if(snoop_ip_forward && (*snoop_ip_forward)(skb) == -6)
                goto drop;
 
then when I try to install the module it repyes with:
    insmod: error inserting 'snoop.ko': -1 Invalid module format

and in /var/log/message appears some lines line:
    kernel: snoop: Unknown symbol __floatsidf
    kernel: snoop: Unknown symbol __fixunsdfsi
    kernel: snoop: Unknown symbol __adddf3
    kernel: snoop: Unknown symbol __muldf3

I will be very pleased if you can help me in some way.
thank you for your time

regards,
Raffaele 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re:
  2005-03-05 10:11 Raffaele Ianniello
@ 2005-03-05 18:14 ` Randy.Dunlap
  0 siblings, 0 replies; 2+ messages in thread
From: Randy.Dunlap @ 2005-03-05 18:14 UTC (permalink / raw)
  To: Raffaele Ianniello; +Cc: linux-kernel

Raffaele Ianniello wrote:
> I have a problem compiling a module that I am porting form 2.4 to 2.6 linux kernel.
> 
> Compiling with this Makefile:
>  
> DEBUG = y
>  
> KERNELDIR = /usr/src/linix.2.6.9
> SUBDIR = $(KERNELDIR)/drivers/snoop
> INCLUDEDIR = $(KERNELDIR)/include
>  
> obj-m := snoop.o
>  
> modules: $(MAKE) -C $(KERNELDIR) SUBDIR=$(SUBDIR) modules
>  
> clean:
>         rm -f *.o
>         rm -f *.ko
> 
> apperars some lines like:
> ***Warning: "snoop_ip_forward" [drivers/snoop/snoop] is COMMON symbol
> ***Warning: "snoop_ip_forward_finish" [drivers/snoop/snoop] is COMMON symbol
>  
> and I have insert in ip_forward.c some lines:
>  
>     extern int (* snoop_ip_forward_finish) (struct sk_buff *);
> 
> and this is in function ip_forward():
>        if(snoop_ip_forward && (*snoop_ip_forward)(skb) == -6)
>                 goto drop;
>  
> then when I try to install the module it repyes with:
>     insmod: error inserting 'snoop.ko': -1 Invalid module format
> 
> and in /var/log/message appears some lines line:
>     kernel: snoop: Unknown symbol __floatsidf
>     kernel: snoop: Unknown symbol __fixunsdfsi
>     kernel: snoop: Unknown symbol __adddf3
>     kernel: snoop: Unknown symbol __muldf3
> 
> I will be very pleased if you can help me in some way.
> thank you for your time

I don't know what the ***Warning's are, but the first 2
problems to solve are:

a.  use a proper 2.6 Makefile:  see Documentation/kbuild/*
     and http://lwn.net/Articles/driver-porting/
     or see an example at
     http://www.xenotime.net/linux/modprms/Makefile
IOW, you need to use the 2.6 build system.

b.  The code is being generated with some floating point
     operations in it.  Linux kernel does not (generally)
     allow/support FP operations in kernel code, so you'll
     need to use some other method for those calculations.
     (unless this problem goes away because of using the
     correct 2.6 build system tools)

-- 
~Randy

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-05 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-05 10:11 Raffaele Ianniello
2005-03-05 18:14 ` Randy.Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).