Strip (Unix)

{{short description|Shell command for removing non-essential information from executable code files}}

{{More citations needed|date=December 2020}}

{{lowercase|title=strip (Unix)}}

{{Infobox software

| name = strip

| logo =

| screenshot =

| screenshot size =

| caption =

| author = Dennis Ritchie
(AT&T Bell Laboratories)

| developer = Various open-source and commercial developers

| released = {{Start date and age|1972|6|12}}

| latest release version =

| latest release date =

| programming language = C

| operating system = Unix, Unix-like, Plan 9, Microsoft Windows

| platform = Cross-platform

| genre = Command

| license = Plan 9: MIT License

| website =

}}

strip is a shell command for removing information from binary executable programs and object files that is not required for execution {{endash}} typically including debugging data, symbol tables, relocation information, and other metadata. The resulting file generally has a smaller size and potentially has increased performance. The resulting file is known as a stripped binary.{{Cite web |title=Linux Strip Command |url=https://www.computerhope.com/unix/strip.htm |access-date=2024-10-01 |website=www.computerhope.com |language=en}}

Using strip can enhance the security of an executable 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 via a compiler or linker to perform the same process.{{Cite web |title=What is the difference between "gcc -s" and a "strip" command? |url=https://stackoverflow.com/questions/1349166/what-is-the-difference-between-gcc-s-and-a-strip-command |access-date=2024-10-01 |website=Stack Overflow |language=en}} For example, in the GNU C compiler (gcc), this is done via the -s option.

The command is available in Unix, Plan 9, and Unix-like systems. The GNU Project includes an implementation in the GNU Binutils package. The command has been implemented in to other operating systems including Windows.

See also

{{Portal|Free and open-source software}}

  • {{Annotated link|Dead code elimination}}
  • {{Annotated link|Debug symbol}}
  • {{Annotated link|Executable compression}}
  • {{Annotated link|List of POSIX commands}}
  • {{Annotated link|strings (Unix)}}
  • {{Annotated link|Symbol table}}

References

{{Reflist}}

  • {{citation | publisher = The Open Group | url = http://www.opengroup.org/onlinepubs/007908799/xcu/strip.html | contribution = strip | title = The Single UNIX Specification, Version 2 | date = 1997}}