Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Licensing  





2 References  





3 External links  














klibc






Español

Русский

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


klibc
Developer(s)H. Peter Anvin
Stable release

2.0.13[1] / 28 July 2023; 11 months ago (28 July 2023)

Repository
Operating systemLinux
TypeRuntime library
LicenseBSD licenses/GPLv2
Websitewww.kernel.org/pub/linux/libs/klibc/

Incomputing, 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.[2] These components do not have access to the standard library (usually glibcormusl) 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.[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 for embedded software in general on a variety of platforms, and is used even by full-featured programs such as the MirBSD Korn Shell.

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[6] 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.[7] An alternate strategy is to include everything in one executable, like BusyBox, which determines the requested applet via arguments or hard links or symlinks.

Licensing[edit]

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

This dual license allows compatibility with both non-copyleft software, as well as GPLv3 programs via the 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. ^ "klibc/klibc.git - klibc main development tree". Retrieved 17 April 2024.
  • ^ a b https://www.kernel.org/doc/Documentation/early-userspace/README [bare URL plain text file]
  • ^ Jonathan Corbet, (November 2002) Initramfs arrives, LWN.net
  • ^ "initramfs merge, part 1 of N". 2002-02-11.
  • ^ "Re: initramfs merge, part 1 of N". 2002-02-11.
  • ^ Debian stable Klibc.
  • ^ "libs/klibc/klibc.git / tree". Archived from the original on 2012-07-08.
  • ^ "klibc.spec.in - klibc/klibc.git - klibc main development tree". git.kernel.org. Retrieved 2020-12-06.
  • External links[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Klibc&oldid=1219372309"

    Categories: 
    C standard library
    Free computer libraries
    Free software programmed in C
    Interfaces of the Linux kernel
    Linux APIs
    Software using the BSD license
    Software using the GPL license
    Hidden categories: 
    All articles with bare URLs for citations
    Articles with bare URLs for citations from March 2022
    Articles with plain text file bare URLs for citations
    Articles with short description
    Short description is different from Wikidata
     



    This page was last edited on 17 April 2024, at 10:51 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki