Date: Sun, 5 Aug 2001 00:40:39 +0200 From: Bernd Walter <ticso@mail.cicely.de> To: freebsd-hackers@FreeBSD.ORG Cc: Bernd Walter <ticso@mail.cicely.de> Subject: Re: linking WITH -lstdc++ makes executeables smaller? Message-ID: <20010805004039.B7991@cicely20.cicely.de> In-Reply-To: <20010804145834.A1138@dragon.nuxi.com>; from dev-null@NUXI.com on Sat, Aug 04, 2001 at 02:58:34PM -0700 References: <20010803141225.A3246@cicely20.cicely.de> <20010804145834.A1138@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 04, 2001 at 02:58:34PM -0700, David O'Brien wrote: > On Fri, Aug 03, 2001 at 02:12:25PM +0200, Bernd Walter wrote: > > I used a library which also needed -lstdc++. > > Now that I did not need them any more I removed them and was > > surprised that the resulting FreeBSD binary actually got bigger! > > On NetBSD the binary is slightly smaller as expected. > > > > Is there any logical explanation for this phaenomen? > > Forget `ls'. Show the output from `size' and `file'. With -lstdc++: ticso@cicely8> size cbckd text data bss dec hex filename 45284 3572 5088 53944 d2b8 cbckd ticso@cicely8> file cbckd cbckd: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs), not stripped Without -lstdc++: ticso@cicely8> size cbckd text data bss dec hex filename 62414 4208 5304 71926 118f6 cbckd ticso@cicely8> file cbckd cbckd: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), dynamically linked (uses shared libs), not stripped Same on alpha: With -lstdc++: ticso@cicely9> size cbckd text data bss dec hex filename 61268 5876 9280 76424 12a88 cbckd ticso@cicely9> file cbckd cbckd: ELF 64-bit LSB executable, Alpha (unofficial), version 1 (FreeBSD), dynamically linked (uses shared libs), not stripped Without -lstdc++: ticso@cicely9> size cbckd text data bss dec hex filename 91177 8024 9712 108913 1a971 cbckd ticso@cicely9> file cbckd cbckd: ELF 64-bit LSB executable, Alpha (unofficial), version 1 (FreeBSD), dynamically linked (uses shared libs), not stripped -- B.Walter COSMO-Project http://www.cosmo-project.de ticso@cicely.de Usergroup info@cosmo-project.de To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010805004039.B7991>