Linux for Programmers and Users

[Page 429 (continued)]

11.9. When You're Done: strip

The debugger and profile utilities both require you compile a program using special options, each of which adds code to the executable file. To remove this extra code after you are finished debugging and profiling, use the strip utility (Figure 11-17).

Figure 11-17. Description of the strip command.

Synopsis: strip { fileName }+

strip removes all of the symbol table, relocation, debugging, and profiling information from the named files.

Here's an example of how much space you can save:

$ ls -lG main2 ...look at original file. -rwxr-xr-x 1 ables 16997 Jan 8 22:18 main2* $ strip main2 ...strip out spurious information. $ ls -lG main2 ...look at stripped version. -rwxr-xr-x 1 ables 3416 Jan 8 23:17 main2* $ _

Категории