Mail Archives: djgpp/1997/01/28/15:12:35
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
|><stdio.h> 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
- Raw text -