Xref: news2.mv.net comp.os.msdos.djgpp:3308 From: pfrisbie AT trmx3 DOT dot DOT ca DOT gov (Phil Frisbie, Jr.) Newsgroups: comp.os.msdos.djgpp Subject: Re: Size of executable Date: 1 May 1996 19:00:51 GMT Organization: CC University of Hohenheim (not responsible for contents) Lines: 30 Message-ID: <4m8cd3$1kmk@power5.rz.uni-hohenheim.de> References: NNTP-Posting-Host: 149.136.3.152 Mime-Version: 1.0 Content-Type: Text/Plain; charset=US-ASCII To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article , u951303 AT rouen DOT daimi DOT aau DOT dk says... > >It seems to me that the executable file produced by gcc is guite large...? >I compiled the standard "Hello, world"-program, and the output executable >took up 57k, 32k when compiled with the -s option. > This may seem like alot, but it is a fixed amount. It doesn't matter what size your program is. The "Hello, world" program might compile to , say, 4k on another compiler. This is about 1/8 the size of DJGPP. But on a larger program, say, 600k, that 28k doesn't make much difference. >I know that there's got to be this stub-loader, dpmi-interfacing etc. >but does this really take up all this space, or did I just overlook >some switch? What are the options if you want to reduce the size of >the output? > It's my understanding that all functions in libc get added weather they are needed or not. If size is really critical, then compile your own libc with just the functions that you need. >I hope this question hasn't been brought up too often :) > Only every few weeks! >Kristian Hogsberg - u951303 AT daimi DOT aau DOT dk Phil Frisbie, Jr. pfrisbie AT trmx3 DOT dot DOT ca DOT gov