Commit | Line | Data |
---|---|---|
b2441318 | 1 | // SPDX-License-Identifier: GPL-2.0 |
057fbfb2 HK |
2 | /* |
3 | * This file setups defines to compile arch specific binary from the | |
4 | * generic one. | |
5 | * | |
6 | * The function 'LIBUNWIND__ARCH_REG_ID' name is set according to arch | |
4d39c89f | 7 | * name and the definition of this function is included directly from |
057fbfb2 HK |
8 | * 'arch/arm64/util/unwind-libunwind.c', to make sure that this function |
9 | * is defined no matter what arch the host is. | |
10 | * | |
11 | * Finally, the arch specific unwind methods are exported which will | |
12 | * be assigned to each arm64 thread. | |
13 | */ | |
14 | ||
15 | #define REMOTE_UNWIND_LIBUNWIND | |
16 | ||
3bd03c95 HK |
17 | /* Define arch specific functions & regs for libunwind, should be |
18 | * defined before including "unwind.h" | |
19 | */ | |
057fbfb2 HK |
20 | #define LIBUNWIND__ARCH_REG_ID(regnum) libunwind__arm64_reg_id(regnum) |
21 | ||
22 | #include "unwind.h" | |
057fbfb2 | 23 | #include "libunwind-aarch64.h" |
d3b58af9 | 24 | #define perf_event_arm_regs perf_event_arm64_regs |
8803880f | 25 | #include <../../../arch/arm64/include/uapi/asm/perf_regs.h> |
d3b58af9 | 26 | #undef perf_event_arm_regs |
057fbfb2 HK |
27 | #include "../../arch/arm64/util/unwind-libunwind.c" |
28 | ||
29 | /* NO_LIBUNWIND_DEBUG_FRAME is a feature flag for local libunwind, | |
30 | * assign NO_LIBUNWIND_DEBUG_FRAME_AARCH64 to it for compiling arm64 | |
31 | * unwind methods. | |
32 | */ | |
33 | #undef NO_LIBUNWIND_DEBUG_FRAME | |
34 | #ifdef NO_LIBUNWIND_DEBUG_FRAME_AARCH64 | |
35 | #define NO_LIBUNWIND_DEBUG_FRAME | |
36 | #endif | |
37 | #include "util/unwind-libunwind-local.c" | |
38 | ||
39 | struct unwind_libunwind_ops * | |
40 | arm64_unwind_libunwind_ops = &_unwind_libunwind_ops; |