reloc.h 703 B

1234567891011121314151617181920212223
  1. #if defined __riscv_float_abi_soft
  2. #define RISCV_FP_SUFFIX "-sf"
  3. #elif defined __riscv_float_abi_single
  4. #define RISCV_FP_SUFFIX "-sp"
  5. #elif defined __riscv_float_abi_double
  6. #define RISCV_FP_SUFFIX ""
  7. #endif
  8. #define LDSO_ARCH "riscv64" RISCV_FP_SUFFIX
  9. #define TPOFF_K 0
  10. #define REL_SYMBOLIC R_RISCV_64
  11. #define REL_PLT R_RISCV_JUMP_SLOT
  12. #define REL_RELATIVE R_RISCV_RELATIVE
  13. #define REL_COPY R_RISCV_COPY
  14. #define REL_DTPMOD R_RISCV_TLS_DTPMOD64
  15. #define REL_DTPOFF R_RISCV_TLS_DTPREL64
  16. #define REL_TPOFF R_RISCV_TLS_TPREL64
  17. #define REL_TLSDESC R_RISCV_TLSDESC
  18. #define CRTJMP(pc,sp) __asm__ __volatile__( \
  19. "mv sp, %1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )