SerhiiKarasov / filcompare

MIT License
2 stars 2 forks source link

secure compilation #5

Open SergeyKarasyov opened 4 years ago

SergeyKarasyov commented 4 years ago
Name Option compiler
Stack-based buffer overrun protection -fstack-protector–fstack-protector-all gcc
GOT Table Protection -Wl,-z, relro gcc
Dynamic link path -Wl,--disable-new-dtags,--rpath [path] gcc
Non-executable stack -Wl,-z,noexecstack gcc
Image randomization –fpie –pie gcc
Insecure C runtime function detection –D_FORTIFY_SOURCE=2 –Wformat-security gcc
SergeyKarasyov commented 4 years ago

https://developers.redhat.com/blog/2018/03/21/compiler-and-linker-flags-gcc/