Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Apr 2003 11:19:46 -0700
From:      Luigi Rizzo <rizzo@icir.org>
To:        hackers@freebsd.org
Subject:   Re: gcc iussue or ... ?
Message-ID:  <20030411111946.A94272@xorpc.icir.org>
In-Reply-To: <20030411140738.GA40724@ussenterprise.ufp.org>; from bicknell@ufp.org on Fri, Apr 11, 2003 at 10:07:38AM -0400
References:  <5.2.0.9.2.20030411082040.02604e90@194.184.65.4> <20030411140738.GA40724@ussenterprise.ufp.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Apr 11, 2003 at 10:07:38AM -0400, Leo Bicknell wrote:
> In a message written on Fri, Apr 11, 2003 at 08:41:37AM +0200, Gianmarco Giovannelli wrote:
> > The problem is that if I compile it under FreeBSD it is a binary of 19M, 
> > while on linux (debian 3.0), same Makefile, is only 2MB. FreeBSD 5.0 and 
> > OpenBSD 3.1 produce the (about) 19M file.
> 
> Well, the problem location is fairly obvious:
> 
> % ls -lags | sort -nr | more
> 19416 -rwxr-xr-x  1 bicknell  wheel  19854956 Apr 11 09:49 lonewolf*
> 16912 -rw-r--r--  1 bicknell  wheel  17286792 Apr 11 09:42 globals.o
...
> may be making them bigger than you expected.  It could also be that
> FreeBSD puts some types of globals in the executable to load, where as

which was exactly the question -- the same exact source code,
compiled with the same compiler flags (and i think even the
same compiler), produces the two different results.
My suspect was that somehow some of the compiler's header files
on FreeBSD explicitly initializes (to 0) some member of some class
thus resulting in having them in the .data section instead of .bss

	cheers
	luigi
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030411111946.A94272>