writing a glibc api for a system call [duplicate]
Possible Duplicate: Need help with glibc source I understand how to implement our own system calls in linux kernel. I know we can call this with syscall() or with _asm() in a c program. But I want to understand how to write glibc api for this new system call?. How the open() and read() glibc function calls mapping into system call in kernel?. char message[ ] = "Hello!\n"; int main( void ) { write( 1, message, 7 ); exit( 0 ); } When I convert the above program into assembly it is giving main: leal 4(%esp), %ecx andl $-16, %esp pushl -4(%ecx) pushl %ebp movl %esp, %ebp pushl %ecx subl $20, %esp