reloc.h 828 B

123456789101112131415161718192021222324252627282930
  1. #ifdef __loongarch_soft_float
  2. #define FP_SUFFIX "-sf"
  3. #elif defined __loongarch_single_float
  4. #define FP_SUFFIX "-sp"
  5. #else
  6. #define FP_SUFFIX ""
  7. #endif
  8. #define LDSO_ARCH "loongarch64" FP_SUFFIX
  9. #define TPOFF_K 0
  10. #define REL_PLT R_LARCH_JUMP_SLOT
  11. #define REL_COPY R_LARCH_COPY
  12. #define REL_DTPMOD R_LARCH_TLS_DTPMOD64
  13. #define REL_DTPOFF R_LARCH_TLS_DTPREL64
  14. #define REL_TPOFF R_LARCH_TLS_TPREL64
  15. #define REL_RELATIVE R_LARCH_RELATIVE
  16. #define REL_SYMBOLIC R_LARCH_64
  17. #define REL_TLSDESC R_LARCH_TLS_DESC64
  18. #define CRTJMP(pc,sp) __asm__ __volatile__( \
  19. "move $sp, %1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )
  20. #define GETFUNCSYM(fp, sym, got) __asm__ ( \
  21. ".hidden " #sym "\n" \
  22. ".align 8 \n" \
  23. " la.local $t1, "#sym" \n" \
  24. " move %0, $t1 \n" \
  25. : "=r"(*(fp)) : : "memory" )