It may be a noob question, but I'm writing bare metal rust code for STM32 (thumbv7m-none-eabi) without japaric's HAL in order to make up with how things work.
So, I was researching resulting binaries with radare2 when noticed
trap instructions (THUMB opcode 0xDEFE) all over my binary. Why do rustc emit them even if with
panic = "abort",
-C force-unwind-tables=no and release profile with debug symbols off?
I've noticed this
trap instructions turn up only after calls to panic functions, so it seems to be done for debug purposes. Is there any way to prevent such rustc's behaviour or it is hardcoded somewhere?