On Wed, Jun 17, 2026 at 6:44 AM H.J. Lu <[email protected]> wrote:
>
> Documentation of __stack_chk_guard
>
> @deftypefn {Target Hook} tree TARGET_STACK_PROTECT_GUARD (void)
> This hook returns a @code{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 be @code{ptr_type_node}.
>
> The default version of this hook creates a variable called
> @samp{__stack_chk_guard}, which is normally defined in @file{libgcc2.c}.
> @end deftypefn
>
> was added by
>
> commit 7d69de618e732d343228a07d797a30e39a6363f4
> Author:     Richard Henderson <[email protected]>
> AuthorDate: Mon Jun 27 00:41:16 2005 -0700
> Commit:     Jakub Jelinek <[email protected]>
> CommitDate: Mon Jun 27 09:41:16 2005 +0200
>
>     c-cppbuiltin.c (c_cpp_builtins): Add __SSP_ALL__ and __SSP__.
>
> __stack_chk_guard was moved to libssp later by
>
> commit 77008252819720c987f11b3dade670e2b3ba09b8
> Author:     Jakub Jelinek <[email protected]>
> AuthorDate: Sat Jul 2 10:52:21 2005 +0200
> Commit:     Jakub Jelinek <[email protected]>
> CommitDate: Sat Jul 2 10:52:21 2005 +0200
>
>     Makefile.def (target_modules): Add libssp.
>
> Its documentation became stale.  Update __stack_chk_guard type to
> uintptr_t if it is a global symbol and its normal location to libssp.
>
> PR libgcc/125190
> * target.def (stack_protect_guard): __stack_chk_guard type is
> uintptr_t if it is a global symbol.  It is normally defined in
> libssp.
> (stack_protect_guard_symbol_p): It is in libssp.
> * targhooks.cc (stack_chk_guard_decl): Likewise.
> * doc/tm.texi: Regenerated.
>
>
> --
> H.J.

PING:

https://patchwork.sourceware.org/project/gcc/patch/came9ropjnr5ormxpkze3cphqjjoaut7yptq8rxnnwpyjp_m...@mail.gmail.com/

-- 
H.J.

Reply via email to