4 * Copyright (c) 2005-2007 Analog Devices Inc.
6 * SPDX-License-Identifier: GPL-2.0+
9 #ifndef _LINUX_LINKAGE_H
10 #define _LINUX_LINKAGE_H
12 #include <asm/linkage.h>
14 /* Some toolchains use other characters (e.g. '`') to mark new line in macro */
20 #define CPP_ASMLINKAGE extern "C"
22 #define CPP_ASMLINKAGE
26 #define asmlinkage CPP_ASMLINKAGE
29 #define SYMBOL_NAME_STR(X) #X
30 #define SYMBOL_NAME(X) X
32 #define SYMBOL_NAME_LABEL(X) X##:
34 #define SYMBOL_NAME_LABEL(X) X:
38 #define __ALIGN .align 4
42 #define __ALIGN_STR ".align 4"
48 #define ALIGN_STR __ALIGN_STR
50 #define LENTRY(name) \
52 SYMBOL_NAME_LABEL(name)
55 .globl SYMBOL_NAME(name) ASM_NL \
59 .weak SYMBOL_NAME(name) ASM_NL \
68 #define ENDPROC(name) \
69 .type name STT_FUNC ASM_NL \