Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use hardening flags when compiling #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

baldurmen
Copy link
Contributor

@baldurmen baldurmen commented Nov 17, 2019

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 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant