Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

klibc

From Wikipedia, the free encyclopedia
Minimalist implementation of C standard library
klibc
DeveloperH. Peter Anvin
Stable release
2.0.14[1] / 4 March 2025; 11 months ago (4 March 2025)
Operating systemLinux
TypeRuntime library
LicenseBSD licenses/GPLv2
Websitekernel.org/pub/linux/libs/klibc/ Edit this on Wikidata
Repository

Incomputing,klibc is a minimalistic subset of thestandard C library developed byH. Peter Anvin. It was developed mainly to be used during theLinux startup process, and it is part of theearly user space, i.e. components used during kernel startup, but which do not run inkernel mode.[2] These components do not have access to the standard library (usuallyglibc ormusl) used by normaluserspace programs.

The development of klibc library was part of the 2002 effort to move some Linux initialization code out of the kernel.[3][4][5] According to its documentation, the klibc library is optimized for correctness and small size.[2] Because of its design, klibc is also technically suitable forembedded software in general on a variety of platforms, and is used even by full-featured programs such as theMirBSD Korn Shell.

During the Linux startup process, klibc is loaded from within a temporaryRAM file system,initramfs. It is incorporated by default into initial RAM file systems that are created by themkinitramfs script inDebian[6] andUbuntu. Furthermore, it has a set of small Unix utilities that are useful inearly user space:cpio,dash, fstype,mkdir,mknod, mount, nfsmount, run-init, etc. all using theklibc library.[7] An alternate strategy is to include everything in one executable, likeBusyBox, which determines the requested applet via arguments or hard links orsymlinks.

Licensing

[edit]

klibc is dual-licensed under a BSD three-clause[8] (formerly four-clause, rectified via theHistorical Permission Notice and Disclaimer), as well as the GPLv2 (GPLv2only, due to Linux-kernel restrictions).

This dual license allows compatibility with both non-copyleft software,as well as GPLv3 programsviathe BSD license (which otherwise would not be compatible). (However, if klibc includes any GPLv2 kernel code such as that in glibc, the entire application reverts to GPLv2.)

References

[edit]
  1. ^https://git.kernel.org/pub/scm/libs/klibc/klibc.git/tag/?h=klibc-2.0.14.{{cite web}}:Missing or empty|title= (help)
  2. ^ab"Early userspace support". Archived fromthe original on 2011-05-02.
  3. ^Jonathan Corbet, (November 2002)Initramfs arrives,LWN.net
  4. ^"initramfs merge, part 1 of N". 2002-02-11.
  5. ^"Re: initramfs merge, part 1 of N". 2002-02-11.
  6. ^Debian stable Klibc.
  7. ^"libs/klibc/klibc.git / tree". Archived fromthe original on 2012-07-08.
  8. ^"klibc.spec.in - klibc/klibc.git - klibc main development tree".git.kernel.org. Retrieved2020-12-06.

External links

[edit]
Features
Standard library
Implementations
Compilers
IDEs
Comparison with
other languages
Descendant
languages
Designer
Retrieved from "https://en.wikipedia.org/w/index.php?title=Klibc&oldid=1329726628"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp