linux-mips
[Top] [All Lists]

RE: undefined symbol '__divdi3' & '__moddi3' on linux kernel 2.6.10 (to

To: "David Sanchez" <david.sanchez@lexbox.fr>
Subject: RE: undefined symbol '__divdi3' & '__moddi3' on linux kernel 2.6.10 (toolchain Linuxi386/Mips32)
From: "David Sanchez" <david.sanchez@lexbox.fr>
Date: Tue, 19 Jul 2005 11:40:32 +0200
Cc: <linux-mips@linux-mips.org>
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
Thread-index: AcWLpJW1Crzv+XqMRBKcfve/GxMtrQAoPf+g
Thread-topic: undefined symbol '__divdi3' & '__moddi3' on linux kernel 2.6.10 (toolchain Linuxi386/Mips32)
As you can see I'm a real newby so I take a long time to find the macro 
do_div() in the linux kernel. This macro does all I want and using it will 
avoid gcc to emits the symbols '__divdi3' and '__moddi3'...

Thanks

-----Message d'origine-----
De : linux-mips-bounce@linux-mips.org [mailto:linux-mips-bounce@linux-mips.org] 
De la part de David Sanchez
Envoyé : lundi 18 juillet 2005 16:30
À : linux-mips@linux-mips.org
Objet : undefined symbol '__divdi3' & '__moddi3' on linux kernel 2.6.10 
(toolchain Linuxi386/Mips32)

Hi,

I'm a newby on Linux/Mips more my English is very poor so sorry...
But I have a big problem (for me):

I want to cross-compile my linux kernel 2.6.10 on my PC i386 for mips32
(alchemy AU1550) CPU.
I developed a module that contains some operations on types loff_t (i.e
long long) such as div and mod. The code is in a foo.c file.

I successfully built a cross toolchain using:
The bin utils (Bintuils-2.15), the glibc headers (glibc-2.3.5) and the
gcc core (gcc-3.4.4).

The compilation of the kernel works but unfortunately the link generates
two error messages on the file foo.c:
Undefined reference to '__divdi3'
Undefined reference to '__moddi3'

What I'm doing wrong ? 
Why the gcc doesn't embed the symbol implementation ? 
And so where can I found an implementation ? 

Thanks for all your help


<Prev in Thread] Current Thread [Next in Thread>