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