请问:GCC的选项问题
我看有人编译时用-fno-stack-protector -z execstack,可是我没有查到这些选项的意思,只查到
-fno-stack-limit,请问:
这些选项是什么意思? http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#Optimize-Options
-fstack-protector
Emit extra code to check for buffer overflows, such as stack smashing attacks. This is done by adding a guard variable to functions with vulnerable objects. This includes functions that call alloca, and functions with buffers larger than 8 bytes. The guards are initialized when a function is entered and then checked when the function exits. If a guard check fails, an error message is printed and the program exits.
http://sourceware.org/binutils/docs-2.22/ld/Options.html#Options
-z应该是ld的选项,文档描述如下:
-z keyword
The recognized keywords are:
`execstack'
Marks the object as requiring executable stack.
页:
[1]