syscalldb.h 971 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef _SYSCALLDB_H_
  2. #define _SYSCALLDB_H_
  3. #ifdef __ASSEMBLER__
  4. .weak syscalldb
  5. .type syscalldb, @function
  6. # if defined(PSEUDO) && defined(SYSCALL_NAME) && defined(SYSCALL_SYMBOL)
  7. # define SYSCALLDB \
  8. subq $128, %rsp; \
  9. movq syscalldb@GOTPCREL(%rip), %rcx; \
  10. call *%rcx; \
  11. addq $128, %rsp
  12. # else
  13. # define SYSCALLDB \
  14. movq syscalldb@GOTPCREL(%rip), %rcx; \
  15. call *%rcx
  16. # endif
  17. #else /* !__ASSEMBLER__ */
  18. asm (
  19. ".weak syscalldb\r\n"
  20. ".type syscalldb, @function\r\n");
  21. #define SYSCALLDB \
  22. "subq $128, %%rsp\n\t" \
  23. "movq syscalldb@GOTPCREL(%%rip), %%rcx\n\t" \
  24. "callq *%%rcx\n\t" \
  25. "addq $128, %%rsp\n\t"
  26. #define SYSCALLDB_ASM \
  27. "movq syscalldb@GOTPCREL(%rip), %rbx\n\t" \
  28. "callq *%rbx\n\t"
  29. long int glibc_option (const char * opt);
  30. asm (
  31. ".weak glibc_option\r\n"
  32. ".type glibc_option, @function\r\n");
  33. #endif /* Assembler */
  34. #endif /* _SYSCALLDB_H */