sparc64: Remove unwind information from signal return stubs [BZ#31244]
[glibc.git] / sysdeps / generic / unwind-resume.c
blob90f45302bb666b11c86f2a1f7029b20fe62de67f
1 /* Copyright (C) 2003-2024 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public License as
6 published by the Free Software Foundation; either version 2.1 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
14 You should have received a copy of the GNU Lesser General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If
16 not, see <https://www.gnu.org/licenses/>. */
18 #include <stdio.h>
19 #include <gnu/lib-names.h>
20 #include <unwind-link.h>
21 #include <sysdep.h>
22 #include <unwind-resume.h>
24 static struct unwind_link *
25 link (void)
27 struct unwind_link *unwind_link = __libc_unwind_link_get ();
28 if (unwind_link == NULL)
29 __libc_fatal (LIBGCC_S_SO " must be installed for unwinding to work\n");
30 return unwind_link;
33 #if !HAVE_ARCH_UNWIND_RESUME
34 void
35 _Unwind_Resume (struct _Unwind_Exception *exc)
37 UNWIND_LINK_PTR (link (), _Unwind_Resume) (exc);
39 #endif
41 _Unwind_Reason_Code
42 __gcc_personality_v0 PERSONALITY_PROTO
44 return UNWIND_LINK_PTR (link (), personality) PERSONALITY_ARGS;
47 _Unwind_Reason_Code
48 _Unwind_ForcedUnwind (struct _Unwind_Exception *exc, _Unwind_Stop_Fn stop,
49 void *stop_argument)
51 return UNWIND_LINK_PTR (link (), _Unwind_ForcedUnwind)
52 (exc, stop, stop_argument);
55 _Unwind_Word
56 _Unwind_GetCFA (struct _Unwind_Context *context)
58 return UNWIND_LINK_PTR (link (), _Unwind_GetCFA) (context);