Bionic (software)

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Developer(s) Open Handset Alliance
Initial release September 23, 2008; 6 years ago (2008-09-23)[1]
Operating system Android[2]
Platform x86, x86-64, ARM, ARM64, MIPS, MIPS64
Type C standard library
License 3-clause BSD licence

The Bionic libc is a derivation of the BSD's standard C library code that was originally developed by Google for their Android[2] operating system based on the Linux kernel. Bionic has several major features specific to the Linux kernel, and its development continues independently of other Android's source code bases.


Publicly stated goals for Bionic are the following:[3][4]

  • BSD license is a non-copyleft license and Google wished to isolate Android applications from the effects of both the GPL and the LGPL:
  • Small size: Bionic is much smaller than the GNU C Library and somewhat smaller than uClibc.
  • Speed: Bionic is designed for CPUs at relatively low clock frequencies.

The recommended way of using Bionic is with the Android Native Development Kit (NDK).

Features and limitations[edit]

Bionic has several restrictions compared to glibc, often derived from the fact that Bionic is a library specifically designed for Android.[3][5][6] Some of the limitations include:

  • Bionic does not include C++ exception handling, perhaps as Google does not use C++ exceptions[7] and Java exceptions are available once the Java virtual machine is started
  • Bionic does not include the Standard Template Library, and developers must include it manually if they need it
  • Bionic does not include wide character support
  • Some functions within Bionic's POSIX and system call headers are stubs or wrappers for Android-specific behavior, causing unintended behavior in some instances.[3][6][8][9]
  • As of Android Jelly Bean MR1 (4.2), bionic builds used in Android include support for glibc's FORTIFY_SOURCE,[10] which is a feature where unsafe string and memory functions (such as strcpy() strcat() and memcpy()) include checks for buffer overruns when buffer sizes can be determined at compile time. This feature is only available for applications compiled with gcc for ARM processors.[11]

See also[edit]


  1. ^ "Announcing the Android 1.0 SDK, release 1". September 9, 2008. Retrieved September 21, 2012. 
  2. ^ a b "Android Anatomy and Physiology" (PDF). Google I/O. 2008-05-28. Retrieved 2014-05-23. 
  3. ^ a b c Burnette, Ed (June 4, 2008). "Patrick Brady dissects Android". ZDNet. 
  4. ^ Turner, David (2009-02-07). "Questions about Bionic". The name "Bionic" comes from the fact that it is part-BSD and part-Linux: its source code consists in a mix of BSD C library pieces with custom Linux-specific bits used to deal with threads, processes, signals and a few others things. 
  5. ^ Devos, Devos (2014). "Bionic vs Glibc report - Master thesis" (PDF). Retrieved 2014-03-22. 
  6. ^ a b Gentry, Denton (2008-11-28). "The Six Million Dollar LibC". 
  7. ^ "Google C++ Style Guide". Google. 
  8. ^ "Not working on Xoom/Android 3.0 Honeycomb". 2011-04-15. 
  9. ^ "getmntent() is not implemented in bionic/libc/bionic/stubs.c". 2011-02-25. 
  10. ^ "Jelly Bean". Android Developers. Retrieved 2013-12-27. 
  11. ^ "Android 4.2 and FORTIFY_SOURCE". Android Security Discussions. Retrieved 2013-12-27. 

External links[edit]