gccint: Stack Smashing Protection
1
1 18.9.15 Stack smashing protection
1 ---------------------------------
1
1 -- Target Hook: tree TARGET_STACK_PROTECT_GUARD (void)
1 This hook returns a 'DECL' node for the external variable to use
1 for the stack protection guard. This variable is initialized by
1 the runtime to some random value and is used to initialize the
1 guard value that is placed at the top of the local stack frame.
1 The type of this variable must be 'ptr_type_node'.
1
1 The default version of this hook creates a variable called
1 '__stack_chk_guard', which is normally defined in 'libgcc2.c'.
1
1 -- Target Hook: tree TARGET_STACK_PROTECT_FAIL (void)
1 This hook returns a 'CALL_EXPR' that alerts the runtime that the
1 stack protect guard variable has been modified. This expression
1 should involve a call to a 'noreturn' function.
1
1 The default version of this hook invokes a function called
1 '__stack_chk_fail', taking no arguments. This function is normally
1 defined in 'libgcc2.c'.
1
1 -- Target Hook: bool TARGET_STACK_PROTECT_RUNTIME_ENABLED_P (void)
1 Returns true if the target wants GCC's default stack protect
1 runtime support, otherwise return false. The default
1 implementation always returns true.
1
1 -- Common Target Hook: bool TARGET_SUPPORTS_SPLIT_STACK (bool REPORT,
1 struct gcc_options *OPTS)
1 Whether this target supports splitting the stack when the options
1 described in OPTS have been passed. This is called after options
1 have been parsed, so the target may reject splitting the stack in
1 some configurations. The default version of this hook returns
1 false. If REPORT is true, this function may issue a warning or
1 error; if REPORT is false, it must simply return a value
1