reloc.h 785 B

1234567891011121314151617181920212223242526272829
  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 CRTJMP(pc,sp) __asm__ __volatile__( \
  18. "move $sp, %1 ; jr %0" : : "r"(pc), "r"(sp) : "memory" )
  19. #define GETFUNCSYM(fp, sym, got) __asm__ ( \
  20. ".hidden " #sym "\n" \
  21. ".align 8 \n" \
  22. " la.local $t1, "#sym" \n" \
  23. " move %0, $t1 \n" \
  24. : "=r"(*(fp)) : : "memory" )