Skip to content

Latest commit

 

History

History
58 lines (43 loc) · 3.55 KB

libc.md

File metadata and controls

58 lines (43 loc) · 3.55 KB

Understanding the lib c is important as it is tightly integrated with kernel under it. And the C library with the corresponding C compiler determines the functionalities of the operating system.

Some famous examples.

  • major Linux distribution ( e.g. Ubuntu, Centos, Redhat OS) and glibc
  • FreeBSD and lib C
  • Android and bionic C library
  • Solaris and lib C
  • Alpine Linux and musl C library
  • openwrt (e.g. embedded Linux) and musl C library
  • TempleOS and holyC compiler and corresponding libraries.

There had been multiple experiments to build the kernel using a different libraries. It is doable, but it requires a herculean efforts to undertake such exercise. The issue is there are missing functionalities within the libraries and they need to be backported to the other systems.

The other issue is the applications running on top of the kernel needs to use library too. When you port an application to a new OS, it needs to port all the API functionalities and library dependencies to the system. And there had been multiple ways to do it.

Here are some examples:

Some comparisons of the libraries

ToolChain

There are also other requirement when porting applications due to system differences.

  • Windows scatter/gather IO vs Linux vectored IO

The other approach is to run the applications in emulated mode. There are many tools for virtualization (e.g. wine, qemu, kvm, wsl and many others. and one can read the notes on virtualizations

C++ library

http://stdcxx.apache.org/download.html https://www.incredibuild.com/blog/top-13-c-libraries-to-watch-out-for https://www.incredibuild.com/blog/what-is-a-virtual-function virtual function