Zephyr API Documentation 4.3.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
cfi.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025 NXP Semicondutors
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/*
8 * DWARF Control Flow Integrity (CFI) support for architectures.
9 */
10
11#ifndef ZEPHYR_INCLUDE_CFI_H_
12#define ZEPHYR_INCLUDE_CFI_H_
13
15
16#if defined(__GNUC__) || defined(__clang__)
17/* DWARF Control Flow Integrity (CFI) support for architectures is only
18 * supported by LLVM and GCC toolchains.
19 */
20#if defined(CONFIG_X86_64)
22#elif defined(CONFIG_X86)
24#elif defined(CONFIG_ARM64)
26#elif defined(CONFIG_ARM)
27#include <zephyr/arch/arm/cfi.h>
28#elif defined(CONFIG_RISCV)
30#endif
31#endif
32
33/*
34 * Inform the unwinder that the return address is undefined.
35 * This prevents bogus unwinding and potential faults.
36 */
37#ifndef ARCH_CFI_UNDEFINED_RETURN_ADDRESS
38#define ARCH_CFI_UNDEFINED_RETURN_ADDRESS()
39#endif
40
41#endif /* ZEPHYR_INCLUDE_CFI_H_ */