Back to home page

OSCL-LXR

 
 

    


0001 #ifndef __ASM_LINKAGE_H
0002 #define __ASM_LINKAGE_H
0003 
0004 #ifdef __ASSEMBLY__
0005 #include <asm/assembler.h>
0006 #endif
0007 
0008 #define __ALIGN     .align 2
0009 #define __ALIGN_STR ".align 2"
0010 
0011 /*
0012  * When using in-kernel BTI we need to ensure that PCS-conformant
0013  * assembly functions have suitable annotations.  Override
0014  * SYM_FUNC_START to insert a BTI landing pad at the start of
0015  * everything, the override is done unconditionally so we're more
0016  * likely to notice any drift from the overridden definitions.
0017  */
0018 #define SYM_FUNC_START(name)                \
0019     SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN)  \
0020     bti c ;
0021 
0022 #define SYM_FUNC_START_NOALIGN(name)            \
0023     SYM_START(name, SYM_L_GLOBAL, SYM_A_NONE)   \
0024     bti c ;
0025 
0026 #define SYM_FUNC_START_LOCAL(name)          \
0027     SYM_START(name, SYM_L_LOCAL, SYM_A_ALIGN)   \
0028     bti c ;
0029 
0030 #define SYM_FUNC_START_LOCAL_NOALIGN(name)      \
0031     SYM_START(name, SYM_L_LOCAL, SYM_A_NONE)    \
0032     bti c ;
0033 
0034 #define SYM_FUNC_START_WEAK(name)           \
0035     SYM_START(name, SYM_L_WEAK, SYM_A_ALIGN)    \
0036     bti c ;
0037 
0038 #define SYM_FUNC_START_WEAK_NOALIGN(name)       \
0039     SYM_START(name, SYM_L_WEAK, SYM_A_NONE)     \
0040     bti c ;
0041 
0042 #endif