-
Notifications
You must be signed in to change notification settings - Fork 609
/
eabi.c
44 lines (32 loc) · 1.21 KB
/
eabi.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/* Copyright (c) 2008 Travis Geiselbrecht
*
* Use of this source code is governed by a MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT
*/
/* some cruft we have to define when using the linux toolchain */
#include <unwind.h>
#pragma GCC diagnostic ignored "-Wmissing-prototypes"
void *__dso_handle;
#if defined(__ARM_EABI_UNWINDER__) && __ARM_EABI_UNWINDER__
/* Our toolchain has eabi functionality built in, but they're not really used.
* so we stub them out here. */
_Unwind_Reason_Code __aeabi_unwind_cpp_pr0(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context) {
return _URC_FAILURE;
}
_Unwind_Reason_Code __aeabi_unwind_cpp_pr1(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context) {
return _URC_FAILURE;
}
_Unwind_Reason_Code __aeabi_unwind_cpp_pr2(_Unwind_State state, _Unwind_Control_Block *ucbp, _Unwind_Context *context) {
return _URC_FAILURE;
}
#endif
/* needed by some piece of EABI */
void raise(void) {
}
int __cxa_atexit(void (*destructor)(void *), void *arg, void *dso_handle) {
return 0;
}
int __aeabi_atexit(void *arg, void (*func)(void *), void *d) {
return __cxa_atexit(func, arg, d);
}