Mail Archives: djgpp/1997/01/08/12:44:09
shearer AT pluto DOT njcc DOT com wrote:
>
> forget about the cornio's addition of approx. 40k...
> ...what makes an executable (which does nothing!),,,
> ...over 61k???
> C is supposed to be the next best thing to ASM!!!...
> but this is laughable...
>
> what gives?
Please take the time to find things out before tossing baseless
accusations. DJGPP is a 32-bit DPMI compiler, and as such has a great
deal of overhead involved in its code, which includes the following
things and more:
Starting up protected mode and loading a DPMI host if necessary.
All the exception handling and PM<->RM mode switching code.
Recognizing and processing DJGPP-style long command lines.
POSIX-style wildcard expansion (globbing).
Reading the DJGPP environment from 'djgpp.env'.
Long filename support.
Debugging information. (*)
There are more, but this is a fairly comprehensive list. The catch is
that all of these things are a FIXED size. The larger the program, the
smaller this overhead becomes relative to the total size. For large
projects, DJGPP compiles code that is significantly smaller than any
other 32-bit compiler in existence. This becomes especially noticeable
when you compile with optimizations.
For small projects, there are ways to remove parts of the startup code
that you don't need. Please read the DJGPP FAQ (v2/faq202b.zip),
chapter 8.15, for full details.
(*) The size of debugging information is relative to the size of your
code, naturally, but I include it here because it is part of the
overhead. To remove this information (which will make your program
impossible to debug), compile with the '-s' parameter, or run 'strip' on
the compiled code.
--
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I | fighteer AT cs DOT com |
| Plan: To find ANYONE willing to | http://www.cs.com/fighteer |
| play Descent 2 on DWANGO! | Tagline: <this space for rent> |
---------------------------------------------------------------------
- Raw text -