Skip to content

Today I learned

Learn something new every day

Menu
  • Home
  • About
  • Hello World! and Why I Started This Blog
Menu

The Importance of Stripping Files

Posted on 12/02/202212/02/2022 by Sagi Rosenthal

Today I learned how to strip files. It is kinda doing what you think – removing redundant stuff from the file.

Binary executable files in Linux are machine language files containing recipes of how to do certain things. When we compile our code the compiler (or interpreter) translates it from “human” language into a machine language. In most cases when it is being done, the compiler will add a symbol table to the output file.

symbol table is a data structure used by a language translator such as a compiler or interpreter, where each identifier (or symbols), constants, procedures and functions in a program’s source code is associated with information relating to its declaration or appearance in the source. In other words, the entries of a symbol table store the information related to the entry’s corresponding symbol.

Wikipedia

This symbol information is crucial when debugging the program. However, it is adding to the size of the file and from the computer perspective, it is redundant. If we’ll remove this data we can achieve 2 advantages:

  1. Decrease in the file size, with no impact of the actual program performance.
  2. Making the compiled code more difficult for reverse-engineering

How can we strip the binary file? simply by running-

strip <your_file>

That’s it, now your file is a little bit smaller but harder to understand for unwanted people. Note that this command overwrites your file and maybe you’ll still want to keep the non-striped version for, well, actual debugging.

Read more:
Wikipedia: https://en.wikipedia.org/wiki/Symbol_table
Computer hope (how to use): https://www.computerhope.com/unix/strip.htm

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

CAPTCHA


Recent Posts

  • How to Sell Stuff Online
  • How to Make Your Kubernetes Dev Cycle Faster
  • How To Be A Valuable Team Member
  • Don’t Make, Go Generate It
  • Why You Should Monkey Patch Your Next Unit-Test

Archives

  • July 2023
  • April 2023
  • January 2023
  • November 2022
  • August 2022
  • July 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022

Categories

  • Go
  • Learning
  • Software Utilities
Join the updates channel
© 2026 Today I learned | Powered by Minimalist Blog WordPress Theme