giomanda giomanda - 6 months ago 37
Linux Question

Linux glibc system call wrappers location

I understand that Linux system calls are usually executed using glibc wrappers. I was able to find the actual source code of various system calls by cloning Linux Kernel source code from github. For example the exit system call code can be found under "/kernel/exit.c".

I am trying to find the source code of the wrappers. I assume that since the wrappers are provided by glibc, those must be already present in the OS (Debian Jessie). Where is the location of, for example, exit system call wrapper code?


To get libc source, run command apt-get source libc6, this will download it's sources and apply Debian-specific patches.

The exit() function is located at path glibc-2.19/stdlib/exit.c