diet libc

Diet libc ( " diet" engl. dietetic ) is a standard C library for Linux operating systems. With diet libc it should be possible to create very compact binaries for Linux. The library was developed by Felix von Leitner with the help of so far just over 100 volunteers. The library under the GPL license, version 2, but there are also commercial licenses available from the author.

Was presented to the professional public library among other things, presentations by Leitner at the 8th International Linux Kongress 2001 and the Chemnitz Linux Days 2002.

Functions

A C standard library typically contains about 200 functions which are required of many programs written in C. The glibc normally used in Linux is based, firstly well beyond these functions and is also of a few larger blocks of code that need to be from a program that uses only one of these functions loaded.

The diet libc, however, was rewritten from scratch and is limited to the most important functions of the standard C library, also the program code is optimized for speed and small scale. The name already alludes to the primary objective of a lean libc, which leads to a size of the software package from just under 160 kB compared to almost 4 MB in glibc. The entire library is modular, so that only the functions need to be loaded, that are actually used in the program. Compared with the normal glibc this gives a significant gain in speed and the programs are much smaller. A complete replacement of glibc is due to the scope of this not yet possible, but with each new version of the diet libc more features will be added to this. In addition, there are a number of patches, in particular with one command line programs and servers can be adapted to the diet libc. Programs need to use the diet libc also generally be recompiled.

History of development

The beginnings of the development of diet libs are only poorly understood, as the oldest versions are undated; the oldest public version is the 0.7, 16 January 2001, the changelogs go back to a version 0.5.9. Meanwhile, the library is available in version 0.33 which was released on March 13, 2013.

Use

Use is the diet libc especially for free software in the field of embedded devices. The GPL does not allow leftists proprietary programs, so here is under the LGPL uClibc is preferred. In addition, the uClibc support more architectures, however, is not like the normal glibc modular. Both libraries are also of T2 SDE, diet libc also of ROCK Linux support. The toolkit GTK is also compatible with diet libc.

In contrast to the larger uClibc they can also be used for very compact Linux distributions, as is the case for example in the case of the now apparently dormant project DietLinux. Even in the used during boot initrd or initramfs- systems of various conventional Linux distributions diet libc is due to space and speed reasons used.

Mainly diet libc is used for static Linkungen, ie the case in which the library in the program itself is contained, instead of having to be present as another file on the system. This is libc by choosing the diet, to a lesser extent but also by the static Linkung itself, saving storage space. This solution is also the author prefers a dynamic Linkung will ever support only on i386 and newer versions on ARM.

236840
de