syscalldb.h 846 B

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