1*e4b17023SJohn Marino /* Library support for -fsplit-stack. */ 2*e4b17023SJohn Marino /* Copyright (C) 2009, 2010 Free Software Foundation, Inc. 3*e4b17023SJohn Marino Contributed by Ian Lance Taylor <iant@google.com>. 4*e4b17023SJohn Marino 5*e4b17023SJohn Marino This file is part of GCC. 6*e4b17023SJohn Marino 7*e4b17023SJohn Marino GCC is free software; you can redistribute it and/or modify it under 8*e4b17023SJohn Marino the terms of the GNU General Public License as published by the Free 9*e4b17023SJohn Marino Software Foundation; either version 3, or (at your option) any later 10*e4b17023SJohn Marino version. 11*e4b17023SJohn Marino 12*e4b17023SJohn Marino GCC is distributed in the hope that it will be useful, but WITHOUT ANY 13*e4b17023SJohn Marino WARRANTY; without even the implied warranty of MERCHANTABILITY or 14*e4b17023SJohn Marino FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 15*e4b17023SJohn Marino for more details. 16*e4b17023SJohn Marino 17*e4b17023SJohn Marino Under Section 7 of GPL version 3, you are granted additional 18*e4b17023SJohn Marino permissions described in the GCC Runtime Library Exception, version 19*e4b17023SJohn Marino 3.1, as published by the Free Software Foundation. 20*e4b17023SJohn Marino 21*e4b17023SJohn Marino You should have received a copy of the GNU General Public License and 22*e4b17023SJohn Marino a copy of the GCC Runtime Library Exception along with this program; 23*e4b17023SJohn Marino see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24*e4b17023SJohn Marino <http://www.gnu.org/licenses/>. */ 25*e4b17023SJohn Marino 26*e4b17023SJohn Marino /* This is a libgcc internal header file for functions shared between 27*e4b17023SJohn Marino generic-morestack.c and generic-morestack-thread.c. The latter 28*e4b17023SJohn Marino file is only used when linking with the pthread library. */ 29*e4b17023SJohn Marino 30*e4b17023SJohn Marino /* The stack segment structure, defined in generic-morestack.c. */ 31*e4b17023SJohn Marino 32*e4b17023SJohn Marino struct stack_segment; 33*e4b17023SJohn Marino 34*e4b17023SJohn Marino /* The list of stack segments for this thread. */ 35*e4b17023SJohn Marino 36*e4b17023SJohn Marino extern __thread struct stack_segment *__morestack_segments; 37*e4b17023SJohn Marino 38*e4b17023SJohn Marino /* Print the string MSG/LEN, the errno number ERR, and a newline on 39*e4b17023SJohn Marino stderr, without using printf. Then crash. */ 40*e4b17023SJohn Marino 41*e4b17023SJohn Marino extern void __morestack_fail (const char *msg, size_t len, int err) 42*e4b17023SJohn Marino __attribute__ ((noreturn, visibility ("hidden"))); 43*e4b17023SJohn Marino 44*e4b17023SJohn Marino /* Release stack segments. */ 45*e4b17023SJohn Marino 46*e4b17023SJohn Marino extern struct dynamic_allocation_blocks * 47*e4b17023SJohn Marino __morestack_release_segments (struct stack_segment **, int) 48*e4b17023SJohn Marino __attribute__ ((visibility ("hidden"))); 49*e4b17023SJohn Marino 50*e4b17023SJohn Marino /* Store the stack information in a processor dependent manner. */ 51*e4b17023SJohn Marino 52*e4b17023SJohn Marino extern void __stack_split_initialize (void) 53*e4b17023SJohn Marino __attribute__ ((visibility ("hidden"))); 54