- 论坛徽章:
- 0
|
本帖最后由 OpeNCore 于 2012-04-19 12:47 编辑
回复 1# netdoger
-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.
-fstack-protector-all
Like -fstack-protector except that all functions are protected.
gcc选项列表,你可以直接搜索:
http://gcc.gnu.org/onlinedocs/gcc/Option-Index.html#Option-Index
gcc选项汇总,按版主说的分类了:
http://gcc.gnu.org/onlinedocs/gc ... html#Option-Summary
gcc选项的简要说明:
http://gcc.gnu.org/onlinedocs/gcc/Invoking-GCC.html#Invoking-GCC
The gcc program accepts options and file names as operands. Many options have multi-letter names; therefore multiple single-letter options may not be grouped: -dv is very different from `-d -v'. (选项不能组合着用,-dv 不同于 -d -v)
You can mix options and other arguments. For the most part, the order you use doesn't matter. Order does matter when you use several options of the same kind; for example, if you specify -L more than once, the directories are searched in the order specified. Also, the placement of the -l option is significant.
(一般的选项顺序不重要,不影响,但是-L和-l涉及到链接的选项顺序就很重要。)
Many options have long names starting with `-f' or with `-W'—for example, -fmove-loop-invariants, -Wformat and so on.
(很多选项除了有短的(单字母的),还有长的名字,如用-f,-W带出来的)
Most of these have both positive and negative forms; the negative form of -ffoo is -fno-foo.
This manual documents only one of these two forms, whichever one is not the default.
其中包含你想问的,大部分选项有两种模式,-fno-foo是对-ffoo的取反。文档中一般只描述其中一种,非默认的那种。
|
|