Difference between strip = symbols and strip = debuginfo

I'm reading here:


and it mentions

strip = "debuginfo"
strip = "symbols"

what is the difference between the two (and advantages btw using one vs the other)?

Thank you!

According to the Rust linker code

debuginfo corresponds to the --strip-debug argument to the LLVM linker. Specifically, it will "Remove all debug sections from the output."

symbols corresponds to --strip-all. The detailed description is "For ELF objects, remove from the output all symbols and non-alloc sections not within segments, except for .gnu.warning, .ARM.attribute sections and the section name table. For COFF objects, remove all symbols, debug sections, and relocations from the output."

In other words, symbols is more thorough than debuginfo and will result in a smaller binary.


thank you :slight_smile:

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.