From: matthew DOT krause AT juno DOT com To: djgpp AT delorie DOT com Date: Wed, 28 Jul 1999 00:44:09 -0400 Subject: Re: Does -s have affect performance? Message-ID: <19990728.004410.-594479.0.matthew.krause@juno.com> X-Mailer: Juno 2.0.11 X-Juno-Line-Breaks: 1,3-5,7-24,26,29-30,35-36,41-42,47-57 X-Juno-Att: 0 MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com >Do you mean "gcc -s"? That switch is used to generate the assembler code so >that -- provided you can understand assembler -- you can have a look at exactly >what is happening in your program. Actually, gcc -s strips debug information from your program while gcc -S aborts the compilation process after the assembler code has been made... #`-S' # Stop after the stage of compilation proper; do not assemble. The # output is in the form of an assembler code file for each # non-assembler input file specified. # By default, the assembler file name for a source file is made by # replacing the suffix `.c', `.i', etc., with `.s'. # Input files that don't require compilation are ignored. as opposed to #`-s' # Remove all symbol table and relocation information from the # executable. The key difference being that -s is passed to the linker, while -S is passed to the compiler... -s will reduce the size of the your program. A similar effect can be had by passing -s to the linker can be had running strip.exe on your program. The allegro demo game(renamed test) compiled out to 937 748 bytes(command line=D:\gcc -o test.exe test.c -lalleg), and was reduced to 557 568 bytes with strip.exe. The size of the program was further reduced to 555 520 bytes by passing -s the the linker (command line= D:\gcc -o test.exe test.c -lalleg -s) and not running strip.exe Running upx.exe --best on the stock executable (no -s nor strip.exe cmdline=D:\gcc -o test.exe test.c -lalleg) reduced the size of the exe to 219 980 (23.46% of its former size). Running strip on that _increased_ the size of the executable to 222 540 bytes... Moral of the story: Don't be greedy (and it specifically says not to do that in the docs, anyway) And now, a question, (OT, of course): Anyone willing to help me set up mingw32? Specifically, how do you pass long commandlines to non-DJGPP programs (both the V and Allegro makefiles are having trouble with too long arguments being passed to ar, and where can I get a win32 version of gnumake? Matthew Krause of Orange, CT USA ICQ UIN : 21302667 AIM: RedBaronMK ___________________________________________________________________ Get the Internet just the way you want it. Free software, free e-mail, and free Internet access for a month! Try Juno Web: http://dl.www.juno.com/dynoget/tagj.