knurling-rs / defmt

Efficient, deferred formatting for logging on embedded systems
https://defmt.ferrous-systems.com/
Apache License 2.0
750 stars 69 forks source link

Add a feature to stop linking the default panic #812

Closed BryanKadzban closed 3 months ago

BryanKadzban commented 4 months ago

When end-user crates provide a panic handler, this symbol is not needed ... but the linker isn't smart enough to optimize it away, even though the PROVIDE line isn't used (the symbol is provided by the rust function tagged with #[panic_handler]). Those crates can enable this feature to remove the PROVIDE line from the linker script, to stop linking this default panic handler.

See #588 for some info.