0
votes

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?

1
"... using glibc wrappers ..." - why don't you look at the glibc source code?Mat
@Mat so the actual wrapper functions are not present in the form of source code but compiled instead?giomanda

1 Answers

1
votes

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