socketcall.s
来自「klibc精简化的c程序库」· S 代码 · 共 56 行
S
56 行
## socketcall.S## Socketcalls use the following convention:# %eax = __NR_socketcall# %ebx = socketcall number# %ecx = pointer to arguments (up to 6)##include <asm/unistd.h>#ifdef __i386__ .text .align 4 .globl __socketcall_common .type __socketcall_common, @function__socketcall_common: xchgl %ebx,(%esp) # The stub passes the socketcall # on stack#ifdef _REGPARM pushl 16(%esp) # Arg 6 pushl 16(%esp) # Arg 5 pushl 16(%esp) # Arg 4 pushl %ecx pushl %edx pushl %eax movl %esp,%ecx#else leal 8(%esp),%ecx # Arguments already contiguous on-stack#endif movl $__NR_socketcall,%eax int $0x80#ifdef _REGPARM addl $6*4, %esp#endif cmpl $-4095,%eax # Error return? popl %ebx jb 1f negl %eax movl %eax,errno orl $-1,%eax # Return -11: ret .size __socketcall_common,.-__socketcall_common#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?