Soby Mathew | b4c6df4 | 2022-11-09 11:13:29 +0000 | [diff] [blame^] | 1 | /* |
2 | * SPDX-License-Identifier: BSD-3-Clause | ||||
3 | * SPDX-FileCopyrightText: Copyright TF-RMM Contributors. | ||||
4 | */ | ||||
5 | |||||
6 | #ifndef IMPORT_SYM_H | ||||
7 | #define IMPORT_SYM_H | ||||
8 | |||||
9 | /* | ||||
10 | * Import an assembly or linker symbol as a C expression with the specified | ||||
11 | * type | ||||
12 | */ | ||||
13 | #define IMPORT_SYM(type, sym, name) \ | ||||
14 | extern unsigned long sym;\ | ||||
15 | static const __attribute__((unused)) type name = (type) (void *)(&sym) | ||||
16 | |||||
17 | #endif /* IMPORT_SYM_H */ |