public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* problem using integer division in kernel modules
@ 2003-01-15 18:41 Thomas Schlichter
  2003-01-15 19:11 ` Matti Aarnio
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Schlichter @ 2003-01-15 18:41 UTC (permalink / raw)
  To: linux-kernel

Hi,

I am writing at a small kernel module and have a problem now using / and %. If 
I do so I get following unresolved symbols when the module should be loaded:
  __divdi3
  __moddi3

Could you please help me and tell me what I do wrong..?

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

* Re: problem using integer division in kernel modules
  2003-01-15 18:41 problem using integer division in kernel modules Thomas Schlichter
@ 2003-01-15 19:11 ` Matti Aarnio
  2003-01-21  9:26   ` george anzinger
  0 siblings, 1 reply; 3+ messages in thread
From: Matti Aarnio @ 2003-01-15 19:11 UTC (permalink / raw)
  To: Thomas Schlichter; +Cc: linux-kernel

On Wed, Jan 15, 2003 at 07:41:29PM +0100, Thomas Schlichter wrote:
> Hi,
> 
> I am writing at a small kernel module and have a problem now using / and %. If 
> I do so I get following unresolved symbols when the module should be loaded:
>   __divdi3
>   __moddi3

  64-bit division with non-constant non-power-of-two divider.

> Could you please help me and tell me what I do wrong..?

  The kernel is linked without gcc builtin libraries.
  Reasons can be found from FAQ (see footer), or archives.

/Matti Aarnio

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

* Re: problem using integer division in kernel modules
  2003-01-15 19:11 ` Matti Aarnio
@ 2003-01-21  9:26   ` george anzinger
  0 siblings, 0 replies; 3+ messages in thread
From: george anzinger @ 2003-01-21  9:26 UTC (permalink / raw)
  To: Matti Aarnio; +Cc: Thomas Schlichter, linux-kernel

Matti Aarnio wrote:
> 
> On Wed, Jan 15, 2003 at 07:41:29PM +0100, Thomas Schlichter wrote:
> > Hi,
> >
> > I am writing at a small kernel module and have a problem now using / and %. If
> > I do so I get following unresolved symbols when the module should be loaded:
> >   __divdi3
> >   __moddi3
> 
>   64-bit division with non-constant non-power-of-two divider.
> 
> > Could you please help me and tell me what I do wrong..?
> 
>   The kernel is linked without gcc builtin libraries.
>   Reasons can be found from FAQ (see footer), or archives.

You may want to check out .../include/asm-???/div64.h.  It
allows some limited divides with 64-bit numbers.  Look at
several so you understand what it does and does not do.

-g
> 
> /Matti Aarnio
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
George Anzinger   george@mvista.com
High-res-timers: 
http://sourceforge.net/projects/high-res-timers/
Preemption patch:
http://www.kernel.org/pub/linux/kernel/people/rml

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

end of thread, other threads:[~2003-01-21  9:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-15 18:41 problem using integer division in kernel modules Thomas Schlichter
2003-01-15 19:11 ` Matti Aarnio
2003-01-21  9:26   ` george anzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox