X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=fVwabAx8Fv3CtQ19HOBiT1LJnYEoEz5kUO/2JDdO8km3B7TD2Un6F95zS5g332RMDGAIQcXyDgBoomrNNl5f7wKDSdNte5HmHTuCF1ahe+1JW0+O4Kc5plzoCeJHwX04W7ZSdFfpCogHHDvJn0k5kGzqMfPkEcWCPk6ZkCAWk/w= Message-ID: <2497d9a20508032131663f0572@mail.gmail.com> Date: Thu, 4 Aug 2005 00:31:48 -0400 From: Matthew Petricone To: djgpp AT delorie DOT com Subject: Re: ___divdi3 and ___moddi3 In-Reply-To: <3lbkd9F11piefU1@news.dfncis.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_163_23159293.1123129908853" References: <2497d9a2050802141537ca5ba8 AT mail DOT gmail DOT com> <3lbkd9F11piefU1 AT news DOT dfncis DOT de> Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk ------=_Part_163_23159293.1123129908853 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 3 Aug 2005 10:25:45 GMT, Hans-Bernhard Broeker < broeker AT physik DOT rwth-aachen DOT de> wrote:=20 >=20 > Matthew Petricone wrote: >=20 > > it compiles ok. but it won't like either with djgpp's ld or ld-elf >=20 > It's almost never a good idea to invoke 'ld' directly unless you have ver= y > particular reasons for doing so. Let 'gcc' handle that for you. =20 > it gives the following errors: undifined reference to '___moddi3' > > and undifined reference to '___divdi3' >=20 > Those are from libgcc.a, which a linker run coordinated by 'gcc' would > have included automatically. True but i'm pretty sure that would break the kernel. -- > Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de) > Even if all the snow were burnt, ashes would remain. >=20 I use ld-elf because I have to link the c code with asm compiled with=20 nasm. Plus i like to use elf since Grub seems to be easier to use with=20 binaries in ELF format. I beleive there is a way around that though.=20 The funny thing is, I use the divide operator in other files, and they=20 don't throw me the error upon linking. ------=_Part_163_23159293.1123129908853 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
On 3 Aug 2005 10:25:45 GMT, Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de> wrote:
Matthew Petricone <strstream AT gmail DOT com> wrote:

>=    it compiles ok. but it won't like either with djgpp's ld or ld= -elf

It's almost never a good idea to invoke 'ld' directly unless you ha= ve very
particular reasons for doing so.  Let 'gcc' handle tha= t for you.
 
 

>  it gives the fol= lowing errors: undifined reference to '___moddi3'
> and undifined ref= erence to '___divdi3'

Those are from libgcc.a, which a linker run coordinated by 'gcc' wo= uld
have included automatically.
 
True but i'm pretty sure that would break the kernel.

--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de= )
Even if all the snow were burnt, ashes would remain.
<= /div>
 
 I use ld-elf because I have to link the c code with asm com= piled with nasm. Plus i like to use elf since Grub seems to be easier to us= e with binaries in ELF format. I beleive there is a way around that though.=
 
The funny thing is, I use the divide operator in other files, and they= don't throw me the error upon linking.

 
------=_Part_163_23159293.1123129908853--