[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: linking surprise...
- To: linuxgames@sunsite.dk
- Subject: Re: linking surprise...
- From: Steve Baker <sjbaker1@airmail.net>
- Date: Tue, 22 Oct 2002 21:33:21 -0500
- Delivered-To: archiver@seul.org
- Delivered-To: mailing list linuxgames@sunsite.dk
- Delivery-Date: Tue, 22 Oct 2002 22:31:48 -0400
- Mailing-List: contact linuxgames-help@sunsite.dk; run by ezmlm
- References: <20021023014240.GA544@homer>
- Reply-To: linuxgames@sunsite.dk
- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204
Christian Henz wrote:
> I compiled some SDL+OpenGL code with both gcc/linux and mingw. With
> mingw, the stripped exe would be < 10KB, while the linux binary was
> ~40KB (5K and 18K upx'ed). Since I want to port a 64K intro to linux,
> this bothered me and I thought, maybe I'd better use glut than SDL.
>
> So i added -lglut to my linker switches just to see how much that would
> add to the size of the binary... surpsisingly the resulting filesize was
> only a fraction of the original one! How can this be?
Probably one has been 'stripped' and the other has not.
'stripping' an exectuatble means removing it's symbol table and other
debug information. It can easily shrink the size of an executable
by a factor of four.
Compiling with differing '-G' options will also make big differences.
---------------------------- Steve Baker -------------------------
HomeEmail: <sjbaker1@airmail.net> WorkEmail: <sjbaker@link.com>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sf.net http://tuxaqfh.sf.net
http://tuxkart.sf.net http://prettypoly.sf.net