delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/01/03:30:45

From: "Mr. X" <fake AT spam DOT free DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Size of executables...
Date: Sun, 1 Mar 1998 00:30:21 -0800
Organization: Skylink Networks, Inc. (http://www.skylink.net./)
Lines: 21
Message-ID: <6db63f$9vn$1@news.skylink.net>
References: <6d9c67$3or3 AT beaker DOT nit DOT gwu DOT edu>
NNTP-Posting-Host: ppp112.max3.las-vegas.nv.skylink.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Umberto Michelucci wrote
>and I have obtained an executable of 370 Kb. Now what I'm doinf wrong? Is
>there any flag to use with gcc to avoid this? The program "hello world" is
>of about 80 Kb. Is it not too much? Does anyone have an idea?
>The compilation of allegro went really fine, so I have already checked
>ther makefile for the flags used there, but I haven't find any clue.


   Yes there is, but I don't remember it off the top of my head.  You can
just "strip prgname.exe" on your releases.  Incredibly, it's normal to have
large executables from C.  If any function is used, the whole lib is linked,
even if none of the other functions are called.  And, when you explicitly
link in other stuff, it links whatever you tell it to link, never checking
if anything is used.  DJGPP does this 'cause GCC does it and GCC does it
because the other C compilers do it and they did it cause K&R did it.  So
much for progress eh?  ;)

X



- Raw text -


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