Could anyone please explain me whats the actual difference between a stripped and a non-stripped binary in Linux ?
After a little bit of googling, I found that non-stripped binary contains the debugging info and stripped binary does'nt.
In Unix, Plan 9, and Unix-like operating systems, the strip program removes information from executable binary programs and object files that is not essential or required for normal and correct execution, thus potentially resulting in better performance and sometimes significantly less disk space usage.
A stripped binary is a program that is compiled with a strip flag that tells the compiler to discard these debugging symbols and compile to program as it is. Stripping a binary reduces its size on the disk and makes it a little more difficult to debug and reverse engineer.
So if you compile an executable with gcc's -g flag, it contains debugging information. Whereas Strip binaries generally remove this debugging information from the exe which is not necessary for execution so as to reduce the size of the exe. Follow this answer to receive notifications.
Stripping a binary does not make your program load faster. The symbol table will not be loaded into memory unless it is needed for a backtrace if your program crashes. You can strip a binary from the command line using the strip command.
Although you have found your answer from the Google. Just putting that , non-stripped binaries have debugging information built into it. So if you compile an executable with gcc's -g
flag, it contains debugging information. Whereas Strip binaries generally remove this debugging information from the exe which is not necessary for execution so as to reduce the size of the exe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With