World Library  
Flag as Inappropriate
Email this Article
 

Klibc

klibc
Developer(s) H. Peter Anvin
Stable release 2.0.4 / July 9, 2014 (2014-07-09) [1]
Written in C[2]
Operating system Linux
Type Runtime library
License GNU General Public License or BSD licence
Website //klibc/libs/linux/pub.org.kernelftp

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.[3] These components do not have access to the standard library (usually glibc) 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.[4][5][6] According to its documentation, the klibc library is optimized for correctness and small size.[3] Because of its design, klibc is also technically suitable for embedded software in general, and even some full-featured programmes such as the MirBSD Korn Shell. klibc is licensed under the full GPL license, which (unlike LGPL) imposes itself on any code linked with it. (This only applies to klibc as a whole due to embedding some Linux kernel derived files; most of the library source code is actually[7] available under a BSD licence from UCB or the Historical Permission Notice and Disclaimer.) This may limit its applicability to commercial embedded software.[8]

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 [9] 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.[10] An alternate strategy is to include everything in one executable, like BusyBox, which determines the program via arguments or a symlink.

See also

Other C standard libraries

References

  1. ^ klibc version 2.0.4 releases
  2. ^ http://www.ohloh.net/p/klibc
  3. ^ a b http://free-electrons.com/kerneldoc/latest/early-userspace/README
  4. ^ Jonathan Corbet, (November 2002) Initramfs arrives, LWN.net
  5. ^ "initramfs merge, part 1 of N". 2002-02-11. 
  6. ^ "Re: initramfs merge, part 1 of N". 2002-02-11. 
  7. ^ usr/klibc/LICENSE as of klibc-1.5.18
  8. ^ Hagen, William W. (2006). The Definitive Guide to GCC, Second Edition. Berkeley, CA: APress. pp. 286–289.  
  9. ^ Debian Wheezy Klibc.
  10. ^ "libs/klibc/klibc.git / tree". 

External links

  • Source archive
  • Browsable development tree
  • Mailing list
  • initramfs and where user space truly begins - LWN, Jonathan Corbet, July 11, 2006.
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and USA.gov, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for USA.gov and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
 
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
 
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.
 


Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.