最佳答案
Can someone point out the difference between gcc -D_FORTIFY_SOURCE=1
and -D_FORTIFY_SOURCE=2
? I guess =2
is more secure? I haven't been able to find a list which lists differences point by point.
I have also read that -D_FORTIFY_SOURCE=2
should be used with -O2
, otherwise not all features would be available. Also here i haven't found a list which would specify the regressions in detail. I would especially be interested to compile with -Os
as the target is a device with not so much flash memory.
Any hints on where this is documented welcome!