Klibc


In computing, klibc is a minimalistic subset of the standard C library developed by H. Peter Anvin. It was developed mainly to be used during the Linux startup process, and it is part of the early user space, i.e. components used during kernel startup, but which do not run in kernel mode. These components do not have access to the standard library used by normal userspace programs.
The development of klibc library was part of the 2002 effort to move some Linux initialization code out of the kernel. According to its documentation, the klibc library is optimized for correctness and small size. Because of its design, klibc is also technically suitable for embedded software in general, and even some full-featured programs such as the MirBSD Korn Shell. klibc is licensed under the full GPL license, which imposes itself on any code linked with it. This may limit its applicability to proprietary embedded software.
During the Linux startup process, klibc is loaded from within a temporary RAM file system, initramfs. It is incorporated by default into initial RAM file systems that are created by the mkinitramfs script in Debian and Ubuntu. Furthermore, it has a set of small Unix utilities that are useful in early user space: cpio, dash, fstype, mkdir, mknod, mount, nfsmount, run-init, etc. all using the klibc library. An alternate strategy is to include everything in one executable, like BusyBox, which determines the requested applet via arguments or hard links or symlinks.