strip is a GNU binary utility that is used to remove information in a compiled binary or object file that is not needed for its execution. This information typically includes debugging information and symbol tables; however, the exact scope of the changes made to the binary is left to the discretion of the program's implementer by using the command-line options.1
Using strip can enhance the security of a binary by making it more difficult to reverse-engineer. The absence of symbol and debugging information complicates the program analysis of the binary.
The effect of strip can also be achieved directly by using the compiler or linker to perform the same process. A compiler is a program that translates source code written in a high-level programming language (like C or C++) into machine code that the computer’s processor can execute. A linker, on the other hand, takes one or more object files generated by the compiler and combines them into a single executable file, resolving any symbol references between them.2
For example, in the GNU Compiler Collection (GCC), this is done by using the "-s” option with gcc. This tells the linker to remove debugging information and symbols during the linking process, resulting in a smaller, stripped executable.3
The GNU Project ships an implementation of strip as part of the GNU Binutils package. strip has been ported to other operating systems including Microsoft Windows.
"Linux Strip Command". www.computerhope.com. Retrieved 2024-10-01. https://www.computerhope.com/unix/strip.htm ↩
"What is the difference between "gcc -s" and a "strip" command?". Stack Overflow. Retrieved 2024-10-01. https://stackoverflow.com/questions/1349166/what-is-the-difference-between-gcc-s-and-a-strip-command ↩