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/>. */
19 #include <gnu/lib-names.h>
20 #include <unwind-link.h>
22 #include <unwind-resume.h>
24 static struct unwind_link
*
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");
33 #if !HAVE_ARCH_UNWIND_RESUME
35 _Unwind_Resume (struct _Unwind_Exception
*exc
)
37 UNWIND_LINK_PTR (link (), _Unwind_Resume
) (exc
);
42 __gcc_personality_v0 PERSONALITY_PROTO
44 return UNWIND_LINK_PTR (link (), personality
) PERSONALITY_ARGS
;
48 _Unwind_ForcedUnwind (struct _Unwind_Exception
*exc
, _Unwind_Stop_Fn stop
,
51 return UNWIND_LINK_PTR (link (), _Unwind_ForcedUnwind
)
52 (exc
, stop
, stop_argument
);
56 _Unwind_GetCFA (struct _Unwind_Context
*context
)
58 return UNWIND_LINK_PTR (link (), _Unwind_GetCFA
) (context
);