Usage of the compilation tool in Linux

Source: Internet
Author: User

GNU binutils is a set of binary tools. Binutils is one of the GNU tools, including connectors, compilers, and other tools for target files and archives. It is a tool for processing and maintaining binary code. Including addr2line ar GPROF nm objcopy objdump ranlib size strings strip.

Ar is used to create, modify, and extract archive files)

Objcopy can convert a target file in one format to a target file in another format.

The file command is used to determine the file type.

Objdump is used to display the information of the target file.

GPROF is used to measure Program Performance

Nm is used to list symbols in the target file. It helps programmers locate and analyze the symbolic information and its attributes in the execution program and target file.

 

The cross-compilation toolchain is an integrated development environment consisting of compilers, connectors, and interpreters. The cross-compilation toolchain consists of binutils, GCC, and glibc. Creating a cross-compilation tool chain is quite complicated. If you don't want to go through complicated and complex compilation processes, you can download some of the compiled and available cross-compilation tool chains on the Internet, however, for the purpose of learning, it is necessary for readers to learn how to create a cross-compilation tool chain. The procedure is as follows:

The first step to build a cross compiler is to determine the target platform. This chapter describes how to build a cross-tool chain based on the ARM platform. Therefore, the target platform is arm-Linux-GNU.
Method 1: Compile and install the library and source code required by the cross-compilation toolchain step by step, and finally generate the cross-compilation toolchain. Method 2: Use the crosstool script tool to compile and generate a cross-compilation tool chain. Method 3: Go to the Internet (ftp.arm.kernel.org. UK) download the prepared cross-compilation tool chain (no flexibility, so building the library used and the version of the compiler may not be suitable for the program you want to compile ).

The compiler needs to use the header file of the system kernel to obtain the information required for system function calls supported by the target platform. For Linux kernel, the best way is to download a suitable kernel and then copy and obtain the header file. You need to make a basic configuration for the kernel to generate the correct header file. However, you do not need to compile the kernel.

 

Crosstool is a set of script tools that build and test different versions of GCC and glibc for those architectures that support glibc.

From: Build ARM Linux cross-compilation toolchain (http://linux.chinaunix.net/techdoc/develop/2008/04/11/991424.shtml)

 

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.