Comparison between android tool chain and GNU tool chain

Source: Internet
Author: User

If you download the source code for the complete Android project, you can find the cross-compilation tool, such as the linux-x86 used by Android, In the prebuilt/arm-eabi-4.2.1/toolchain/arm-eabi-gcc-4.2.1/bin directory.

Android does not use glibc as the C library, but uses the Bionic Libc developed by Google. The built-in Toolchain (prebuilt) is based on Bionic Libc rather than glibc. This makes other toolchains more difficult to use for Android.
Most Linux enthusiasts use Toolchain at http://www.codesourcery.com/gnu_toolchains/arm/download.htmlto download a common toolchain.
It is feasible to compile and transplant the Android Linux kernel, because the kernel does not require the C library, but it is troublesome to directly use other toolchains when developing Android applications.
However, only compiled applications can run in Android simulators using static compilation, which is obviously unacceptable in actual development. Currently, we have not seen any documents indicating that other cross compilers have been successfully transplanted to compile Android applications. (???)

Compared with glibc, Bionic Libc has the following features:
[Cpp]
-1 adopts BSD License instead of glibc GPL License;
-2 The size is only about 200 k, which is about half smaller than glibc and faster than glibc;
-3 implements a smaller and faster pthread;
-4 provides important functions required by Android, such as "getprop" and "LOGI;
-5 does not fully support POSIX standards, such as C ++ exceptions and wide chars;
-6 libthread_db and libm are not provided. (???)


In addition, some other binary tools used in Android are also special:
[Cpp]
-1 when loading a dynamic library,/system/bin/linker is used instead of common/lib/ld. so;
-2 The prelink tool is not a commonly used prelink, but a prelink. the source code of the prelink tool is build, tools, and apriori;
-3 strip tool does not use commonly used strip, namely, the arm-eabi-strip under the prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin directory, instead, it is the soslim tool located in out/host/linux-x86/bin.


Solution to underlying problems: Remove Android system coupling
[Cpp]
1. Remove Dalvik from bionic and hardware drivers
2. Modify Dalvik to support standard glibc and GNU/Linux
3. Treat Dalvik as a common application
4 Dalvik can be individually optimized and improved

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.