4 # On i386, the main (only?) user of socketcall(2), the memory array
5 # socketcall(2) needs is conveniently already assembled for us on
6 # the stack. Capitalize on that to make a common socketcall stub.
9 #include <asm/unistd.h>
15 .globl __socketcall_common
16 .type __socketcall_common, @function
20 movzbl %al,%ebx # The socketcall number is passed in in %al
21 leal 8(%esp),%ecx # Argument pointer
22 movl $__NR_socketcall, %eax
24 cmpl $-125,%eax # Error return?
30 decl %eax # Return = -1
34 .size __socketcall_common,.-__socketcall_common