1 Source File hello. C (text) -- à Preprocessor ---- à hello. I (text)
Preprocessor: insert the content of the # include file into this command, check the full-text processing # define macro definition, and compile the command for processing conditions # If # endif unneeded code, after processing, generate the modified source code hello. i.
2 Hello. I (text) ---- à compiler ------ à hello. S (assembler text)
Compiler: the lexical analysis syntax analysis generates an Assembly statement such as mov ax and BX, which is equivalent to the source file of the optimized assembly language.
3 Hello. S (Assembly text) ------ à assembler ---- à hello. O (Binary of the target file)
Assembler: translates the Assembly source file into the corresponding machine commands, and also writes something into a package with the machine commands into a file that can be located in the target program format hello. o
4 hello. o)
Connector: for example, hello. O calls the standard library function eg prinf. The function of the connector is to find the target file XX where prinf is located. O or xx. lib and insert the program to our hello. o, specifically, what is the details and how to find xx. what about o? Is it just incorporated into the functions used?
5. Execute hello.exe: when running a program under OS, for example, we use double
Clicka xx.exe icon. First, the OS calls a function called the loader. After reading and analyzing the information in the executable file, it copies its code and data
In memory, and then perform some operations (?) Transfer control to this program.