Linux Kernel Modules 2.2.12 question

Linux Kernel Modules 2.2.12 question

Post by Mark.Vogelsber.. » Thu, 09 Sep 1999 04:00:00



Hi folks,

I try to compile a module under 2.2.12 that uses the get_user() and
put_user() macros. I included asm/uaccess.h and everything else.
Compilation works very fine. But when I try to
'insmod' the module I get the error that the __get_user_X() can't be
resolved.
I have the same problem on using memcpy()...

What's going wrong ?

Thanks a lot!

 
 
 

Linux Kernel Modules 2.2.12 question

Post by St├ęphane MASSO » Sat, 11 Sep 1999 04:00:00


Have you checked for the MOD_VERSIONs problem ?
I had some symbols unresolved with classical kernel functions
(printk...) because modules need MODVERSION flag. This seems to include
a kind of cheksum at the end of the symbols (printk becomes
printk_R94tz...). See the kernel module programming Guide (available
from the LDP site) for more details.
Regards.
Stephane MASSON.


Quote:

> Hi folks,

> I try to compile a module under 2.2.12 that uses the get_user() and
> put_user() macros. I included asm/uaccess.h and everything else.
> Compilation works very fine. But when I try to
> 'insmod' the module I get the error that the __get_user_X() can't be
> resolved.
> I have the same problem on using memcpy()...

> What's going wrong ?

> Thanks a lot!


 
 
 

Linux Kernel Modules 2.2.12 question

Post by Mark Vogelsberge » Sat, 11 Sep 1999 04:00:00



> Have you checked for the MOD_VERSIONs problem ?
> I had some symbols unresolved with classical kernel functions
> (printk...) because modules need MODVERSION flag. This seems to include
> a kind of cheksum at the end of the symbols (printk becomes
> printk_R94tz...). See the kernel module programming Guide (available
> from the LDP site) for more details.
> Regards.
> Stephane MASSON.

I found a nice Makefile that did the version stuff, this was my fault.

Thanks


> > Hi folks,

> > I try to compile a module under 2.2.12 that uses the get_user() and
> > put_user() macros. I included asm/uaccess.h and everything else.
> > Compilation works very fine. But when I try to
> > 'insmod' the module I get the error that the __get_user_X() can't be
> > resolved.
> > I have the same problem on using memcpy()...

> > What's going wrong ?

> > Thanks a lot!

 
 
 

Linux Kernel Modules 2.2.12 question

Post by Matt Giann » Tue, 19 Oct 1999 04:00:00


I'm having the same problems under 2.2.5-15 ... do you still have that
Makefile?

./z.o: unresolved symbol __put_user_X

It's driving me nuts!

Thanks!
Matt


> I found a nice Makefile that did the version stuff, this was my fault.

>> > Hi folks,

>> > I try to compile a module under 2.2.12 that uses the get_user() and
>> > put_user() macros. I included asm/uaccess.h and everything else.
>> > Compilation works very fine. But when I try to
>> > 'insmod' the module I get the error that the __get_user_X() can't be
>> > resolved.
>> > I have the same problem on using memcpy()...

>> > What's going wrong ?

>> > Thanks a lot!

 
 
 

Linux Kernel Modules 2.2.12 question

Post by Matt Giann » Wed, 20 Oct 1999 04:00:00


Phew ... I've finally got things working!

For others that are having problems with unresolved symbols in their
modules, the bit I was missing was an optimization flag. Appearently gcc
doesn't expand inlines unless optimization is enabled.


> I'm having the same problems under 2.2.5-15 ... do you still have that
> Makefile?
> ./z.o: unresolved symbol __put_user_X
> It's driving me nuts!
> Thanks!
> Matt

>> I found a nice Makefile that did the version stuff, this was my fault.

>>> > Hi folks,

>>> > I try to compile a module under 2.2.12 that uses the get_user() and
>>> > put_user() macros. I included asm/uaccess.h and everything else.
>>> > Compilation works very fine. But when I try to
>>> > 'insmod' the module I get the error that the __get_user_X() can't be
>>> > resolved.
>>> > I have the same problem on using memcpy()...

>>> > What's going wrong ?

>>> > Thanks a lot!