3

I'm looking deeper into how Linux actually works, especially on embedded devices, with all the different components required to make a fully functional system.

I understand that a standard C library implementation such as glibc is separate and is required in order for my user-space application to communicate and hence work together with the Linux Kernel.

However, does the Linux code itself actually depend on this standard library? Can Linux execute by itself without having this?

  • The glibc is not required for user-space applications to work with the kernel. The glibc shared lib is only required for programs which depend on it, but that's also true for the libcaca.so shared lib (I'm not making that name up). – mosvy Jun 6 at 16:24
4

No, the kernel doesn’t depend on the standard C library (or any other library), it is self-contained. User-space programs don’t necessarily depend on the C library either; for example Go programs don’t. The C library provides convenient wrappers for system calls, but they can be called directly without going through the C library, and other language runtimes can provide their own wrappers.

(This does mean that the kernel contains the implementation of quite a few functions which one would usually expect to be provided by the C library, sometimes in simplified versions more appropriate for the kernel. See this kernel newbies FAQ for details.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.