next up previous contents
Next: Compiling problems Up: Compiler usage Previous: Creating an executable for

Reducing the size of your program

When you created your program, it is possible to reduce its size. This is possible, because the compiler leaves a lot of information in the program which, strictly speaking, isn't required for the execution of it. The surplus of information can be removed with a small program called strip. It comes with the GO32 development environment under DOS, and is standard on LINUX machines where you can do development. The usage is simple. Just type

strip prog
On the command line, and the strip program will remove all unnecessary information from your program. This can lead to size reductions of up to 30 %.

You can use the -Xs switch to let the compiler do this stripping automatically.



Michael Van Canneyt
Tue Mar 31 16:44:14 CEST 1998