cpp-d1064d
[cross.git] / i686-linux-gnu-4.7 / usr / share / doc / gcc-4.7-base / README.ssp
1 Stack smashing protection is a feature of GCC that enables a program to
2 detect buffer overflows and immediately terminate execution, rather than
3 continuing execution with corrupt internal data structures. It uses
4 "canaries" and local variable reordering to reduce the likelihood of
5 stack corruption through buffer overflows.
6
7 Options that affect stack smashing protection:
8
9 -fstack-protector
10     Enables protection for functions that are vulnerable to stack
11     smashing, such as those that call alloca() or use pointers.
12
13 -fstack-protector-all
14     Enables protection for all functions.
15
16 -Wstack-protector
17     Warns about functions that will not be protected. Only active when
18     -fstack-protector has been used.
19
20 Applications built with stack smashing protection should link with the
21 ssp library by using the option "-lssp" for systems with glibc-2.3.x or
22 older; glibc-2.4 and newer versions provide this functionality in libc.
23
24 The Debian architectures alpha, hppa, ia64, m68k, mips, mipsel do not
25 have support for stack smashing protection.
26
27 More documentation can be found at the project's website:
28 http://researchweb.watson.ibm.com/trl/projects/security/ssp/