1 /* RTL buffer overflow protection function for GNU C compiler 2 Copyright (C) 1987, 88, 89, 92-7, 1998 Free Software Foundation, Inc. 3 4 This file is part of GCC. 5 6 GCC is free software; you can redistribute it and/or modify it under 7 the terms of the GNU General Public License as published by the Free 8 Software Foundation; either version 2, or (at your option) any later 9 version. 10 11 GCC is distributed in the hope that it will be useful, but WITHOUT ANY 12 WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with GCC; see the file COPYING. If not, write to the Free 18 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 19 02111-1307, USA. */ 20 21 22 /* declaration of GUARD variable */ 23 #define GUARD_m Pmode 24 #define UNITS_PER_GUARD MAX(BIGGEST_ALIGNMENT / BITS_PER_UNIT, GET_MODE_SIZE (GUARD_m)) 25 26 #ifndef L_stack_smash_handler 27 28 /* insert a guard variable before a character buffer and change the order 29 of pointer variables, character buffers and pointer arguments */ 30 31 extern void prepare_stack_protection PARAMS ((int inlinable)); 32 33 #ifdef TREE_CODE 34 /* search a character array from the specified type tree */ 35 36 extern int search_string_def PARAMS ((tree names)); 37 #endif 38 39 /* examine whether the input contains frame pointer addressing */ 40 41 extern int contains_fp PARAMS ((rtx op)); 42 43 /* Return size that is not allocated for stack frame. It will be allocated 44 to modify the home of pseudo registers called from global_alloc. */ 45 46 extern HOST_WIDE_INT get_frame_free_size PARAMS ((void)); 47 48 /* allocate a local variable in the stack area before character buffers 49 to avoid the corruption of it */ 50 51 extern rtx assign_stack_local_for_pseudo_reg PARAMS ((enum machine_mode, HOST_WIDE_INT, int)); 52 53 #endif 54