linkage.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef __ASM_LINKAGE_H
  2. #define __ASM_LINKAGE_H
  3. #ifdef __ASSEMBLY__
  4. #include <asm/assembler.h>
  5. #endif
  6. #define __ALIGN .align 2
  7. #define __ALIGN_STR ".align 2"
  8. /*
  9. * When using in-kernel BTI we need to ensure that PCS-conformant
  10. * assembly functions have suitable annotations. Override
  11. * SYM_FUNC_START to insert a BTI landing pad at the start of
  12. * everything, the override is done unconditionally so we're more
  13. * likely to notice any drift from the overridden definitions.
  14. */
  15. #define SYM_FUNC_START(name) \
  16. SYM_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) \
  17. bti c ;
  18. #define SYM_FUNC_START_NOALIGN(name) \
  19. SYM_START(name, SYM_L_GLOBAL, SYM_A_NONE) \
  20. bti c ;
  21. #define SYM_FUNC_START_LOCAL(name) \
  22. SYM_START(name, SYM_L_LOCAL, SYM_A_ALIGN) \
  23. bti c ;
  24. #define SYM_FUNC_START_LOCAL_NOALIGN(name) \
  25. SYM_START(name, SYM_L_LOCAL, SYM_A_NONE) \
  26. bti c ;
  27. #define SYM_FUNC_START_WEAK(name) \
  28. SYM_START(name, SYM_L_WEAK, SYM_A_ALIGN) \
  29. bti c ;
  30. #define SYM_FUNC_START_WEAK_NOALIGN(name) \
  31. SYM_START(name, SYM_L_WEAK, SYM_A_NONE) \
  32. bti c ;
  33. #define SYM_TYPED_FUNC_START(name) \
  34. SYM_TYPED_START(name, SYM_L_GLOBAL, SYM_A_ALIGN) \
  35. bti c ;
  36. #endif