From: myknees AT aol DOT com (Myknees) Newsgroups: comp.os.msdos.djgpp Subject: Re: Simple == Big Date: 16 Oct 1997 01:07:09 GMT Lines: 79 Message-ID: <19971016010701.VAA01517@ladder01.news.aol.com> NNTP-Posting-Host: ladder01.news.aol.com References: <3442AF1E DOT 102C AT club-internet DOT fr> Organization: AOL http://www.aol.com To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk In article , Eli Zaretskii writes: >No, it probably means that the options you set in RHIDE somehow don't get >to gcc. I don't use RHIDE, so I won't know why that might happen, but it >seems like the simplest explanation to everything you report. > >Just to make sure that I'm right, try compiling your program from the DOS >prompt and see if -O3 and -s (lower-case) have any effect on the size of >the .exe file. They should. [snip] Well, this thread is interesting even if it is overkill to worry so much about little programs. Just for the sake of curiousity, I followed up on your suggestions and also got together some info on the type of results I got with different switches & options. The code I used is at the bottom (and yes, it is unrealistically simple, but yes, I do use the resulting .exe!) ================================ Before each test, the c80.exe and c80.o files were deleted. From RHIDE1.4 no switches: 102,166 -O3 compiler option: 102,040 -O2 compiler option: 102,040 -O3 compiler + -s linker options: 45,568 -O2 compiler + -s linker options: 45,568 After running the djp compressor on the 46K file, it was 28,864 bytes in size. From the command line: gcc c80.cc -O2 -s -o c80.exe ...resulted in a 45,568 byte .exe file, as did gcc -o c80.exe -O3 -s c80.cc (My first time using the command line, so might not be right.) =============================== /* The point of this prog is to set the textmode to C80 format. textmode() is in conio.h. */ #include #include int main() { textmode(C80); return 0; } /* The three following functions are supposed to turn off some of the overhead code (for dealing with command line arguments, etc. If I did it right!) */ __crt0_glob_function() { return 0; } __crt0_load_environment_file() { return 0; } __crt0_setup_arguments_function() { return 0; }