delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/26/22:22:49

Message-ID: <38DECB5D.3C38247B@gtcom.net>
From: Krogg <krogg DOT no DOT to DOT spam AT gtcom DOT net>
X-Mailer: Mozilla 4.61 [en] (Win95; U)
X-Accept-Language: en-US,en-GB,en,ja
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: EXE files too big!
References: <8bjhuu$8pt$1 AT newssrv DOT otenet DOT gr> <o0mqdskei6jkr3or9b64skepq1ja7h5dsm AT 4ax DOT com>
Lines: 62
Date: Sun, 26 Mar 2000 21:45:49 -0500
NNTP-Posting-Host: 12.16.178.145
X-Trace: eagle.america.net 954125261 12.16.178.145 (Sun, 26 Mar 2000 21:47:41 EST)
NNTP-Posting-Date: Sun, 26 Mar 2000 21:47:41 EST
Organization: 24hoursupport.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Damian Yerrick wrote:
> 
> On Sun, 26 Mar 2000 01:27:12 +0200, "Bad Sector" <kom000 AT otenet DOT gr>
> wrote:
> 
> >I saw that DJGPP creates very big files. DJGPP stores many debugging
> >info in EXE files. That is good for debugging my apps, but if i want
> >to give these apps to others they must be smaller. the question is:
> >how can i turn off this debugging info?
> 
> Here's what I do:
> 
> 1. Download and install UPX.  http://upx.tsx.org/
> 2. Run UPX on your executables.
>      c:\>upx -9 foo.exe
> 
> UPX strips the debugging symbols from DJGPP/COFF executables,
> compresses what's left (code and data tables), and adds a
> decompressor stub at the beginning.

Upx is great...I have even comprerssed some of the other executables on
my system with it....but,you can get even smaller .exe's using the
-s switch AND upx.

Plain compile of a simple program......120503 bytes
With the -s switch               .......58880 bytes
plain compile + upx              .......34028 bytes
-s switch + upx                  .......34008 bytes

Its not a huge difference with this particular program
so i will try another.

Plain compile of a simple program......537804 bytes
With the -s switch               ......289792 bytes
plain compile + upx              ......123416 bytes
-s switch + upx                  ......123400 bytes

hmmmm....I thought i was making a point but it looks
like you only save a few bytes with using both...still
there are a FEW bytes saved....

I am gonna try one more thing....
Ok i tried the -s switch and the -O2 switch AND upx.
ended up with..........................119268 bytes

Now,that IS a little better...Now someone is gonna
tell me that the -O2 switch is some kind of bad thing
that i will wish i hadnt ever heard of......

Hope i helped.....

-- 


|"""""<`.THE PRINCE ,'>"""""""""""""""""""""""""""""""""""|
|      `.`/""""""\,','            my sig is too big,      |
|SEE HIS (  /   \ \' SEE HIS      but its really cool.    |
| FACE    \/<> <>\/   SMILE                               |
|         /   W   \          Visit my ascii art site:     |
|       ,'\_|||||_/`.  http://www.gtcom.net/~krogg/ascii/ |
|     ,','   |||   `.`.     krogg DOT no DOT to DOT spam AT gtcom DOT net    |
|____<,' TIME TO DIE `.>____Remove no.to.spam to reply____|

- Raw text -


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