What files does gcc need?

Source: Internet
Author: User
The number of files required by gcc-general Linux technology-Linux programming and kernel information. The following is a detailed description. I want to put a gcc system that can compile the basic C program on a small system, so that I can use the minimum system or compile some small programs if necessary, so I did the following work:

Copied the following files:
/Usr/bin/gcc -- gcc execution Program

/Usr/lib/gcc/i386-pc-linux-gnu/gcc_version/* -- gcc corresponds to the C language compiler, for example, cc1plus, collect2 and so on, there are some. o files

/Usr/lib/libgcc_s.so. This function is not clear and seems to be used for output after compilation. It plays a role in the link stage.

/Usr/include/header file. You can use rpm-ql glibc-devel | grep "\. h "find out, this is about m, it is estimated that there is still redundancy, because the glibc-2.3.5 source code under the include directory only 8 xxKBs

/Usr/bin/ld and/usr/bin/as, compile the compiler and linker, and support its running. so file, which belongs to the binutils package, not the content of the gcc package

/Usr/lib/crt ?. O, including crt1.o, crti. o, and crtn. o. This is the link target code corresponding to the glibc library and does not belong to the gcc package.

/Usr/lib/libc. so and/usr/lib/libc_nonshared.a. The former is a pure text configuration description file, and the latter is the code of some hard-linked functions.

The affiliation of some summarized files:
Related to gcc versions include gcc, all files in the same directory as cc1plus and cc1plus, and libgcc_s.so.

Related to binutils: as and ld and library files supporting them

Glibc versions are involved in:/usr/lib/crt ?. O and/usr/lib/libc. so, libc_nonshared.a, And the header files under/usr/include corresponding to glibc

The final statistics show that all files use approximately 26MBs space, which is still very large. However, you can also copy and use gdb.
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.