Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

strip (Unix)

From Wikipedia, the free encyclopedia
Standard UNIX utility
This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed.
Find sources: "Strip" Unix – news ·newspapers ·books ·scholar ·JSTOR
(December 2020) (Learn how and when to remove this message)
strip
Original author(s)Dennis Ritchie
(AT&T Bell Laboratories)
Developer(s)Variousopen-source andcommercial developers
Initial releaseJune 12, 1972; 52 years ago (1972-06-12)
Written inC
Operating systemUnix,Unix-like,Plan 9,Microsoft Windows
PlatformCross-platform
TypeCommand
LicensePlan 9:MIT License

InUnix,Plan 9, andUnix-likeoperating systems, thestrip program is acommand-line utility used to remove non-essential information fromexecutablebinary programs andobject files. This information, which is not required forexecution, typically includesdebugging data,symbol tables,relocation information, and othermetadata. Its primary purpose is to reduce thefile size of the binary executable and potentially increase performance. The output of this process is known as astripped binary.

Description

[edit]

strip is aGNU binary utility that is used to remove information in a compiled binary orobject file that is not needed for itsexecution. This information typically includesdebugging information andsymbol tables; however, the exact scope of the changes made to the binary is left to the discretion of the program's implementer by using thecommand-line options.[1]

Usingstrip can enhance the security of a binary by making it more difficult toreverse-engineer. The absence of symbol and debugging information complicates theprogram analysis of the binary.

The effect ofstrip can also be achieved directly by using thecompiler orlinker to perform the same process. A compiler is a program that translatessource code written in ahigh-level programming language (likeC orC++) intomachine 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 singleexecutable file, resolving any symbolreferences between them.[2]

For example, in theGNU Compiler Collection (GCC), this is done by using the "-s” option withgcc. This tells the linker to remove debugging information and symbols during the linking process, resulting in a smaller, stripped executable.[2]

TheGNU Project ships an implementation ofstrip as part of theGNU Binutils package.strip has beenported to other operating systems includingMicrosoft Windows.

See also

[edit]

References

[edit]
  1. ^"Linux Strip Command".www.computerhope.com. Retrieved2024-10-01.
  2. ^ab"What is the difference between "gcc -s" and a "strip" command?".Stack Overflow. Retrieved2024-10-01.

External links

[edit]
The WikibookGuide to Unix has a page on the topic of:Commands
File system
Processes
User environment
Text processing
Shell builtins
Searching
Documentation
Software development
Miscellaneous
File system
Processes
User environment
Text processing
Shell builtins
Networking
Searching
Software development
Miscellaneous
Retrieved from "https://en.wikipedia.org/w/index.php?title=Strip_(Unix)&oldid=1249102721"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp