1 /*
2  * Copyright (c) 2021 Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef ZEPHYR_INCLUDE_TOOLCHAIN_ARMCLANG_H_
8 #define ZEPHYR_INCLUDE_TOOLCHAIN_ARMCLANG_H_
9 
10 
11 #include <toolchain/llvm.h>
12 
13 /*
14  * To reuse as much as possible from the llvm.h header we only redefine the
15  * __GENERIC_SECTION and Z_GENERIC_SECTION macros here to include the `used` keyword.
16  */
17 #undef __GENERIC_SECTION
18 #undef Z_GENERIC_SECTION
19 
20 #define __GENERIC_SECTION(segment) __attribute__((section(STRINGIFY(segment)), used))
21 #define Z_GENERIC_SECTION(segment) __GENERIC_SECTION(segment)
22 
23 #endif /* ZEPHYR_INCLUDE_TOOLCHAIN_ARMCLANG_H_ */
24