I recently got interested about inner workings of compilers, standard libraries and kernels. While I was searching for the source code of the standard C library, I came across with Glibc. But what it says in Glibc’s official website is: the library which defines the ''system calls'' and other basic facilities such as open, malloc, printf, exit...
So I guess that Glibc actually doesn’t provide the source code of the standard C library, but instead provides the system calls for those functions, and then the kernel takes care of them, am I right?
I would like to learn more about those things. For example, how do the sin, printf, and strlen, functions get executed in C programs? If Glibc provides just the system calls, where are the actual source codes of those functions? How does the kernel execute them? Where can be found the source code of the part of the kernel that executes those functions?
The C library is a userland library almost like any library.
The System Calls are an interface provided by the kernel.
They have nothing to do with the C standard. They are OS specific.
Some similarities exist between UNIX-like operating systems but that’s a different topic.
Some of the functions implemented in the C library will end-up calling a system call one way or another. But that’s just the same with any other library.
I recommend looking at the C library from OpenBSD. Android phones use it as well.
It’s simple and clear and very well documented. You can find it here.