This hook returns a
DECL
node for the external variable to use for the stack protection guard. This variable is initialized by the runtime to some random value and is used to initialize the guard value that is placed at the top of the local stack frame. The type of this variable must beptr_type_node
.The default version of this hook creates a variable called __stack_chk_guard, which is normally defined in libgcc2.c.
This hook returns a tree expression that alerts the runtime that the stack protect guard variable has been modified. This expression should involve a call to a
noreturn
function.The default version of this hook invokes a function called __stack_chk_fail, taking no arguments. This function is normally defined in libgcc2.c.