mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Richard B. Johnson" <root@chaos.analogic.com>
To: Lei Yang <leiyang@nec-labs.com>
Cc: Lee Revell <rlrevell@joe-job.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Kernel Newbies Mailing List <kernelnewbies@nl.linux.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: Problems compiling kernel modules
Date: Mon, 23 Aug 2004 10:52:18 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0408231046190.7816@chaos> (raw)
In-Reply-To: <412A01AC.5020108@nec-labs.com>

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.



  reply	other threads:[~2004-08-23 14:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-21 19:24 Lei Yang
2004-08-21 21:44 ` Sam Ravnborg
2004-08-21 19:45   ` Lei Yang
2004-08-21 20:05     ` viro
2004-08-21 20:13     ` Lee Revell
2004-08-21 21:50     ` Sam Ravnborg
2004-08-21 19:55       ` Lei Yang
2004-08-21 20:46       ` Lei Yang
2004-08-21 20:57         ` Lee Revell
2004-08-23 14:10           ` Lei Yang
2004-08-23 14:29             ` Richard B. Johnson
2004-08-23 14:39               ` Lei Yang
2004-08-23 14:52                 ` Richard B. Johnson [this message]
2004-08-23 15:04                   ` Lei Yang
2004-08-23 15:20                     ` Richard B. Johnson
2004-08-23 15:25                     ` Sam Ravnborg
2004-08-23 15:44                       ` Lei Yang
2004-08-23 16:21                         ` Alan Cox
2004-08-23 14:52                 ` Alan Cox
2004-08-23 15:48               ` Andreas Schwab
2004-08-21 21:11         ` Alex Goddard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.53.0408231046190.7816@chaos \
    --to=root@chaos.analogic.com \
    --cc=kernelnewbies@nl.linux.org \
    --cc=leiyang@nec-labs.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rlrevell@joe-job.com \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®