blob: 49b84a2d1280d0952f26a50925cb609ad656c214 [file] [log] [blame]
Soby Mathewb4c6df42022-11-09 11:13:29 +00001/*
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 */