Last week I released the Linux and windows version of an application.
And after the release we realized that the symbols were not stripped off, and my manager thinks (and I disagree) that it might allow the user to understand our algorithm.
Anyway, now, I will have to clean-up the symbols and re-release the application.
My question,
To remove debugging symbols from a binary (which must be an a. out or ELF binary), run strip --strip-debug filename. Wildcards can be used to treat multiple files (use something like strip --strip-debug $LFS/tools/bin/*).
The strip command reduces the size of XCOFF object files. The strip command optionally removes the line number information, relocation information, the debug section, the typchk section, the comment section, file headers, and all or part of the symbol table from the XCOFF object files.
--strip-symbol=symbolname Remove symbol symbolname from the source file. This option may be given more than once, and may be combined with other strip options, except -K.
Using the -R option to strip, you can strip away all sections you don't need. Also look at this regarding minimal ELF executables. Show activity on this post.
With Visual C++ (and other Microsoft compilers) on Windows, symbols aren't part of the binaries. Instead, they are stored in separate files called "Program Database" files (.pdb files). Just don't provide the .pdb files.
With the GNU toolchain you would use strip
to remove symbols from the binaries.
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