1*404b540aSrobert /* Stack protector support.
2*404b540aSrobert Copyright (C) 2005 Free Software Foundation, Inc.
3*404b540aSrobert
4*404b540aSrobert This file is part of GCC.
5*404b540aSrobert
6*404b540aSrobert GCC is free software; you can redistribute it and/or modify it under
7*404b540aSrobert the terms of the GNU General Public License as published by the Free
8*404b540aSrobert Software Foundation; either version 2, or (at your option) any later
9*404b540aSrobert version.
10*404b540aSrobert
11*404b540aSrobert In addition to the permissions in the GNU General Public License, the
12*404b540aSrobert Free Software Foundation gives you unlimited permission to link the
13*404b540aSrobert compiled version of this file into combinations with other programs,
14*404b540aSrobert and to distribute those combinations without any restriction coming
15*404b540aSrobert from the use of this file. (The General Public License restrictions
16*404b540aSrobert do apply in other respects; for example, they cover modification of
17*404b540aSrobert the file, and distribution when not linked into a combine
18*404b540aSrobert executable.)
19*404b540aSrobert
20*404b540aSrobert GCC is distributed in the hope that it will be useful, but WITHOUT ANY
21*404b540aSrobert WARRANTY; without even the implied warranty of MERCHANTABILITY or
22*404b540aSrobert FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
23*404b540aSrobert for more details.
24*404b540aSrobert
25*404b540aSrobert You should have received a copy of the GNU General Public License
26*404b540aSrobert along with GCC; see the file COPYING. If not, write to the Free
27*404b540aSrobert Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
28*404b540aSrobert 02110-1301, USA. */
29*404b540aSrobert
30*404b540aSrobert /* As a special exception, if you link this library with files compiled with
31*404b540aSrobert GCC to produce an executable, this does not cause the resulting executable
32*404b540aSrobert to be covered by the GNU General Public License. This exception does not
33*404b540aSrobert however invalidate any other reasons why the executable file might be
34*404b540aSrobert covered by the GNU General Public License. */
35*404b540aSrobert
36*404b540aSrobert #include "config.h"
37*404b540aSrobert
38*404b540aSrobert extern void __stack_chk_fail (void);
39*404b540aSrobert
40*404b540aSrobert /* Some targets can avoid loading a GP for calls to hidden functions.
41*404b540aSrobert Using this entry point may avoid the load of a GP entirely for the
42*404b540aSrobert function, making the overall code smaller. */
43*404b540aSrobert
44*404b540aSrobert #ifdef HAVE_HIDDEN_VISIBILITY
45*404b540aSrobert void
46*404b540aSrobert __attribute__((visibility ("hidden")))
__stack_chk_fail_local(void)47*404b540aSrobert __stack_chk_fail_local (void)
48*404b540aSrobert {
49*404b540aSrobert __stack_chk_fail ();
50*404b540aSrobert }
51*404b540aSrobert #endif
52