reloc.h 669 B

1234567891011121314151617181920
  1. #define LDSO_ARCH "x86_64"
  2. #define REL_SYMBOLIC R_X86_64_64
  3. #define REL_OFFSET32 R_X86_64_PC32
  4. #define REL_GOT R_X86_64_GLOB_DAT
  5. #define REL_PLT R_X86_64_JUMP_SLOT
  6. #define REL_RELATIVE R_X86_64_RELATIVE
  7. #define REL_COPY R_X86_64_COPY
  8. #define REL_DTPMOD R_X86_64_DTPMOD64
  9. #define REL_DTPOFF R_X86_64_DTPOFF64
  10. #define REL_TPOFF R_X86_64_TPOFF64
  11. #define REL_TLSDESC R_X86_64_TLSDESC
  12. #define CRTJMP(pc,sp) __asm__ __volatile__( \
  13. "mov %1,%%rsp ; jmp *%0" : : "r"(pc), "r"(sp) : "memory" )
  14. #define GETFUNCSYM(fp, sym, got) __asm__ ( \
  15. ".hidden " #sym "\n" \
  16. " lea " #sym "(%%rip),%0\n" \
  17. : "=r"(*fp) : : "memory" )