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
21 movzbl %al,%ebx # The socketcall number is passed in in %al
22 leal 8(%esp),%ecx # Argument pointer
23 movl $__NR_socketcall,%eax
26 cmpl $-4096,%eax # Error return?
34 orl $-1,%eax # Return -1
38 .size __socketcall_common,.-__socketcall_common