Do you know if the embedded system uses glibc or bionic?

for example, android uses bionic, not glibc, but how do you understand it, it really uses bionic http://en.wikipedia.org/wiki/Bionic_(software) , and not glibc?

Can I find this information in the / proc file system or is there any command that can tell that bionic is being used on the current system?

By the way, is it possible to have more than one c lib on embedded systems?

+5
source share
1 answer

If you have code that should behave differently depending on whether it is associated with Bionic or Glibc, this can and should be determined at compile time. Bionic and Glibc are not compatible with binary versions anyway, so you need to commit one set of headers at compile time.

#if __BIONIC__
/* Bionic-specific code */    
#elif __GLIBC__
/* Glibc-specific code */
#else
#error "This C library is not supported"
#endif

You will not find any information in /proc, because it /proccontains information about the kernel, not about the C library.

C- , . , . , , C , ( ). , Bionic Android, Android Bionic, Android Bionic Bionic. , Android Linux, , Glibc, ( ), libc, uClibc Dietlibc.

+4

All Articles