delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/14/05:47:26

From: myknees AT aol DOT com (Myknees)
Newsgroups: comp.os.msdos.djgpp
Subject: Simple == Big
Date: 10 Oct 1997 01:49:32 GMT
Lines: 29
Message-ID: <19971010014900.VAA05748@ladder02.news.aol.com>
NNTP-Posting-Host: ladder02.news.aol.com
Organization: AOL http://www.aol.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Hello all.

I just sent a little program of mine to a friend.  It is as small a
program as I can write, but when the attachment was uploading, I noticed
that it was taking a long time.  When I checked the size of the file, it
turned out to be over 60K.  Seems very big.  Windows' Notepad.exe is half
that size.

Now before you start yelling about the FAQ, let me say that I did read the
part in the FAQ where it says that when compiling small programs the size
of the .exe file may seem large because of the overhead outweighing the
program itself.

I also read the part where it says that you can reduce the size of the
executable file by running the compiler with the -s option to strip all the
debugging information.  I am working from RHIDE1.4, so I went to
options/compiler options/ and there I put -s.

But there is no difference in size between the resulting .exe files with &
without this switch.  That is strange.  The info.exe stuff said that -S
(not -s) will make compilation stop short of assembly.  That's not what's
happening.  Later it says that the -s option "removes all symbol table and
relocation information from the executable."

Now here's the kicker.  I also added the -O3 option, and the resulting
executable was still the same size.  Does this mean that all simple
programs compiled with djgpp will always be inordinately large?

--Ed (Myknees)

- Raw text -


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