delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2005/08/04/00:33:21

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 <strstream AT gmail DOT com>
To: djgpp AT delorie DOT com
Subject: Re: ___divdi3 and ___moddi3
In-Reply-To: <3lbkd9F11piefU1@news.dfncis.de>
Mime-Version: 1.0
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

------=_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 <strstream AT gmail DOT com> 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

<div><span class=3D"gmail_quote">On 3 Aug 2005 10:25:45 GMT, <b class=3D"gm=
ail_sendername">Hans-Bernhard Broeker</b> &lt;<a href=3D"mailto:broeker AT phy=
sik.rwth-aachen.de">broeker AT physik DOT rwth-aachen DOT de</a>&gt; wrote:</span>
<blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0=
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Matthew Petricone &lt;<a href=3D=
"mailto:strstream AT gmail DOT com">strstream AT gmail DOT com</a>&gt; wrote:<br><br>&gt;=
&nbsp;&nbsp; it compiles ok. but it won't like either with djgpp's ld or ld=
-elf
<br><br>It's almost never a good idea to invoke 'ld' directly unless you ha=
ve very<br>particular reasons for doing so.&nbsp;&nbsp;Let 'gcc' handle tha=
t for you.</blockquote>
<div>&nbsp;</div>
<div>&nbsp;</div><br>
<blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0=
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">&gt;&nbsp;&nbsp;it gives the fol=
lowing errors: undifined reference to '___moddi3'<br>&gt; and undifined ref=
erence to '___divdi3'
<br><br>Those are from libgcc.a, which a linker run coordinated by 'gcc' wo=
uld<br>have included automatically.</blockquote>
<div>&nbsp;</div>
<div>True but i'm pretty sure that would break the kernel.</div><br>
<blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0=
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">--<br>Hans-Bernhard Broeker (<a =
href=3D"mailto:broeker AT physik DOT rwth-aachen DOT de">broeker AT physik DOT rwth-aachen DOT de=
</a>
)<br>Even if all the snow were burnt, ashes would remain.<br></blockquote><=
/div>
<div>&nbsp;</div>
<div>&nbsp;I use ld-elf because&nbsp;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.=
 </div>

<div>&nbsp;</div>
<div>The funny thing is, I use the divide operator in other files, and they=
 don't throw me the error upon linking.<br><br>&nbsp;</div>

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019