giomanda giomanda - 1 year ago 101
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?

Answer Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download