Sadly, we can't use any stack protector since it's not supported by the gcc arm cross compiler.
I also replaced Os by O2, as I found it made litteraly no difference and that's what Debian recommends:
user@computer:~/toboot$ ls -l *
O2-bins:
total 228
-rw-r--r-- 1 user user 5664 nov 15 00:19 toboot.bin
-rw-r--r-- 1 user user 6660 nov 15 00:19 toboot-booster.bin
-rw-r--r-- 1 user user 6676 nov 15 00:19 toboot-booster.dfu
-rw-r--r-- 1 user user 191496 nov 15 00:19 toboot.elf
-rw-r--r-- 1 user user 15964 nov 15 00:19 toboot.ihex
Os-bins:
total 228
-rw-r--r-- 1 user user 5664 nov 15 00:19 toboot.bin
-rw-r--r-- 1 user user 6660 nov 15 00:19 toboot-booster.bin
-rw-r--r-- 1 user user 6676 nov 15 00:19 toboot-booster.dfu
-rw-r--r-- 1 user user 191492 nov 15 00:19 toboot.elf
-rw-r--r-- 1 user user 15964 nov 15 00:19 toboot.ihex
Those flags come from the Debian gcc hardening best practices: https://wiki.debian.org/Hardening
Sadly, we can't use any stack protector since it's not supported by the gcc arm cross compiler.
I also replaced
Os
byO2
, as I found it made litteraly no difference and that's what Debian recommends: