How to use "--gc-sections" link option to reduce target binary size?

You may want to follow some of the suggestions in GitHub - johnthagen/min-sized-rust: 🦀 How to minimize Rust binary size 📦 to reduce the binary size.