Message-Id: <199705191546.PAA04454@mx2.rmplc.co.uk> From: "Liam" To: "George Foot" , Subject: Re: Why does gcc make such big binaries? Date: Sun, 18 May 1997 20:24:39 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Precedence: bulk George Foot wrote: > : Which compiled to 60k. > : I tried the equivilent programs in turbo pascal, and got 2.4k and 1.6k > : respectivly. > Do the same thing using debug, writing it in assembler; you'll only need a > couple of bytes :) > The point is, there is a certain amount of startup code which gets added > to all your programs. It performs several functions, including looking for > a DPMI host, loading CWSDPMI if it can't find one, globbing the > command-line, switching to protected mode and starting your actual program > code. For these short programs it is pretty useless; you don't need > protected mode to just do nothing; nor do you need therefore a DPMI > server, a stub, command-line globbing, etc. If gcc produces protected mode code, is there a similar program, under GNU, that will produce real-mode programs. I bet that the majority of the code that people on this news group/mailing list write do not NEED a protected mode compiler. It's fine if you intend to write a program that will take over the system, but it's not necessary if you just want to write a small utility, its pointless. All protected mode compilers dont produce baisc files that size do they? Liam