Re: Problems compiling kernel modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 23 Aug 2004, Lei Yang wrote:

> Richard B. Johnson wrote:
>
> > Do `depmod -e test.ko` to see what it's complaining about. You
> > can see all the symbols by using `nm`. Try it. Your code
> > probably didn't define the necessary stuff to make a module.
> > You need to look at a typical module (driver) that comes with the
> > kernel. Just find one of the shortest ".c" files in the driver
> > tree.
>
> Thanks! I did less /var/log/messages, and got the unknown symbols
> Unknown symbol __divsf3
> Unknown symbol __fixsfsi
> Unknown symbol __subsf3
> Unknown symbol __floatsisf
> Unknown symbol __mulsf3
> Unknown symbol __gesf2
> Unknown symbol __addsf3
>
> However, I don't know what those symbols are :( I am a bit worried that
> maybe I've done something that is not supported by the kernel, like
> left-shift 16 bits of an int, or floating operations.
>
> Any hints?
>
> Thanks a lot!
> Lei

You cannot use floating-point in the kernel. It appears that you
are trying to make user-mode code execute within the kernel. It
can't. That's not what a module does. The kernel executes code
on behalf of the user-mode caller, in the context of the caller.
It does things, on behalf of the user, that the user can't
be trusted to do properly by himself. That's all the kernel
is for! Any calculations and similar stuff can be done in
regular user-mode code.

Cheers,
Dick Johnson
Penguin : Linux version 2.4.26 on an i686 machine (5570.56 BogoMips).
            Note 96.31% of all statistics are fiction.



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux