xref: /dflybsd-src/contrib/gcc-4.7/libssp/ssp-local.c (revision 94b98a915ba84699b2a2adab9146fbc2cf617459)
1*f02514dfSJohn Marino /* Stack protector support.
2*f02514dfSJohn Marino    Copyright (C) 2005, 2009 Free Software Foundation, Inc.
3*f02514dfSJohn Marino 
4*f02514dfSJohn Marino This file is part of GCC.
5*f02514dfSJohn Marino 
6*f02514dfSJohn Marino GCC is free software; you can redistribute it and/or modify it under
7*f02514dfSJohn Marino the terms of the GNU General Public License as published by the Free
8*f02514dfSJohn Marino Software Foundation; either version 3, or (at your option) any later
9*f02514dfSJohn Marino version.
10*f02514dfSJohn Marino 
11*f02514dfSJohn Marino In addition to the permissions in the GNU General Public License, the
12*f02514dfSJohn Marino Free Software Foundation gives you unlimited permission to link the
13*f02514dfSJohn Marino compiled version of this file into combinations with other programs,
14*f02514dfSJohn Marino and to distribute those combinations without any restriction coming
15*f02514dfSJohn Marino from the use of this file.  (The General Public License restrictions
16*f02514dfSJohn Marino do apply in other respects; for example, they cover modification of
17*f02514dfSJohn Marino the file, and distribution when not linked into a combine
18*f02514dfSJohn Marino executable.)
19*f02514dfSJohn Marino 
20*f02514dfSJohn Marino GCC is distributed in the hope that it will be useful, but WITHOUT ANY
21*f02514dfSJohn Marino WARRANTY; without even the implied warranty of MERCHANTABILITY or
22*f02514dfSJohn Marino FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
23*f02514dfSJohn Marino for more details.
24*f02514dfSJohn Marino 
25*f02514dfSJohn Marino Under Section 7 of GPL version 3, you are granted additional
26*f02514dfSJohn Marino permissions described in the GCC Runtime Library Exception, version
27*f02514dfSJohn Marino 3.1, as published by the Free Software Foundation.
28*f02514dfSJohn Marino 
29*f02514dfSJohn Marino You should have received a copy of the GNU General Public License and
30*f02514dfSJohn Marino a copy of the GCC Runtime Library Exception along with this program;
31*f02514dfSJohn Marino see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
32*f02514dfSJohn Marino <http://www.gnu.org/licenses/>.  */
33*f02514dfSJohn Marino 
34*f02514dfSJohn Marino 
35*f02514dfSJohn Marino #include "config.h"
36*f02514dfSJohn Marino 
37*f02514dfSJohn Marino extern void __stack_chk_fail (void);
38*f02514dfSJohn Marino 
39*f02514dfSJohn Marino /* Some targets can avoid loading a GP for calls to hidden functions.
40*f02514dfSJohn Marino    Using this entry point may avoid the load of a GP entirely for the
41*f02514dfSJohn Marino    function, making the overall code smaller.  */
42*f02514dfSJohn Marino 
43*f02514dfSJohn Marino #ifdef HAVE_HIDDEN_VISIBILITY
44*f02514dfSJohn Marino void
45*f02514dfSJohn Marino __attribute__((visibility ("hidden")))
__stack_chk_fail_local(void)46*f02514dfSJohn Marino __stack_chk_fail_local (void)
47*f02514dfSJohn Marino {
48*f02514dfSJohn Marino   __stack_chk_fail ();
49*f02514dfSJohn Marino }
50*f02514dfSJohn Marino #endif
51