Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Principle Analysis of Linux tool GCC Compiler

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the principle analysis of Linux tool GCC compiler, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Overview

The GCC (GNU Compiler Collection) compiler is the default compiler for the GNU Linux operating system

Preprocessing of compilation process

The preprocessor CPP performs preprocessing, expands header files, macros, etc., and generates .i files.

Compile

GCC supports a variety of programming languages, assuming that the c language ze calls the C language compiler cll. After the compilation, the assembler is generated and the .s file is output.

Compilation

GCC calls the assembler as to assemble to generate a redirectable object program.

Link

GCC call linker connects all object files and C language standard libraries into executable binary files.

Compilation option

Programs compiled locally on the current target platform and generally run only on the currently compiled platform.

Cross-compilation compiles on one platform and then runs on another platform. This process is called cross-compilation.

Gcc compilation options

Option

-c

Compiles and assembles the specified source file, but does not link

-S

Compiles the specified source file, but does not assemble

-E preprocesses the specified source file without compiling-o to generate the target file, [file1] [file2] compiles the file file2 into an executable file file1-Idirectory specifies the search directory of the include containing file-g to generate debugging information, and the program can be debugged by the debugger.

-Wall

Generate all warning messages

On the Linux tool GCC compiler principle analysis is shared here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report