trying to follow the call chain for a simple lib routine

Mike Frysinger vapier@gentoo.org
Fri Sep 11 20:53:00 GMT 2009


On Friday 11 September 2009 15:44:43 Robert P. J. Day wrote:
>   for example, i'd like to show how a call to getpid() translates into
> a call to the corresponding system call.  i've got the source for
> glibc spread out in front of me, but i'm having trouble following how
> that call would be processed.  on my x86_64 system, i've found files
> like syscalls.list, whose format is somewhat readable but i'm not sure
> how it's consulted.

syscalls.list is processed by the build system into a symbol that just does a 
syscall.  there is no additional logic in glibc for it.  you would get the 
same behavior (for the most part) if you used syscall() and called the kernel 
directly yourself.  the nuances of the different syscalls.list flags dont 
really matter for what you're trying to document.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-help/attachments/20090911/f75a83aa/attachment.sig>


More information about the Libc-help mailing list