Section 11.9. When You re Done: strip


[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* $ _ 





Linux for Programmers and Users
Linux for Programmers and Users
ISBN: 0131857487
EAN: 2147483647
Year: 2007
Pages: 339

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net