c语言编译原理详解.doc
上传者:蓝天
2022-06-15 11:36:27上传
DOC文件
87 KB
C语言编译原理详解
C language compiler principles
C language compilation process detailed
C language compiler link process is to write our C program (source code) into hardware can run on the program (executable code), you need to compile and link. Compiling is the process of translating text form source code into the target file in the form of machine language. The link is to organize the target files, the startup code of the operating system, and the library files that are used, and finally generate executable code. The entire code compilation process is divided into the compilation and the link two processes.
First, the compilation process
The compilation process can be divided into two stages: Compilation and assembly.
1, compile
Compilation is to read the source (Zi Fuliu), the lexical and syntax analysis, the high-level language instructions converted to functional equivalent assembly code, the source file contains two main stages of the compilation process:
The first stage is the preprocessing phase, which takes place prior to the formal compile phase. The preprocessing phase modifies the contents of the source file based on the preprocessing instructions that have been placed in the file.
The ftinclude directive, for example, is a preprocessing instruction that adds the contents of the header file to the. Cpp file. This method of modifying source files before compiling
C language compiler principles
C language compilation process detailed
C language compiler link process is to write our C program (source code) into hardware can run on the program (executable code), you need to compile and link. Compiling is the process of translating text form source code into the target file in the form of machine language. The link is to organize the target files, the startup code of the operating system, and the library files that are used, and finally generate executable code. The entire code compilation process is divided into the compilation and the link two processes.
First, the compilation process
The compilation process can be divided into two stages: Compilation and assembly.
1, compile
Compilation is to read the source (Zi Fuliu), the lexical and syntax analysis, the high-level language instructions converted to functional equivalent assembly code, the source file contains two main stages of the compilation process:
The first stage is the preprocessing phase, which takes place prior to the formal compile phase. The preprocessing phase modifies the contents of the source file based on the preprocessing instructions that have been placed in the file.
The ftinclude directive, for example, is a preprocessing instruction that adds the contents of the header file to the. Cpp file. This method of modifying source files before compiling
c语言编译原理详解