From: cziwkga AT ulcc DOT ac DOT uk (Kevin Ashley) Newsgroups: comp.os.msdos.djgpp Subject: Re: DJGPP v. gcc Date: 28 Jan 1997 16:25:50 GMT Organization: University of London Computer Centre Lines: 25 Distribution: world Message-ID: <5cl9ae$970@calypso.ulcc.ac.uk> References: <5cj9it$ho8$1 AT spasmolytic DOT openix DOT com> Reply-To: k DOT ashley AT ulcc DOT ac DOT uk NNTP-Posting-Host: silver-e.ulcc.ac.uk To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <5cj9it$ho8$1 AT spasmolytic DOT openix DOT com>, jkapleau AT openix DOT com (Jonathan Kapleau) writes: |>Maybe this is a stupid question, but how come when I compile a simple |>program (i.e. "Hello, World!") using DJGPP on my pc using only the |> header file it compiles to something like 80k, but when I |>compile it using gcc under Linux the same program compiles to about 4k. |>What gives? Under DOS, the standard libraries have to do a fair amount of work that is done by the shell and/or operating system under any Unix variant such as Linux. This includes the small amount of code to detect whether DPMI services are present, and load CWSDPMI if they aren't, wild-card expansion in the shell command line, dealing with long/indirect argument passing (only significant if program is invoked from another DJGPP or compliant application) and others I can't think of at the moment. The stdio libraries also have to try harder to make DOS's I/O model look more like what ANSI C says stdio should be like. It may also be that Linux is able to save space by using shared libraries. Since I don't use Linux, I don't know if that's the case. ------------------------------------------------------------------------------ Kevin Ashley K DOT Ashley AT Ulcc DOT ac DOT uk Development Manager http://www.ulcc.ac.uk/staff/Kevin+Ashley University of London Computer Centre. ...ukc!ncdlab!K.Ashley This is not a signature