-
15
pages
-
English
-
Documents
Description
MODULE W A STORY OF COMPILER, ASSEMBLER, LINKER AND LOADER My Training Period: hours Note: This Module presents quite a detail story of a process (running program). It tries to investigate how the C / C++ source codes preprocessed, compiled, linked and loaded as a running program. It is based on the GCC (GNU Compiler Collection). When you use the IDE (Integrated Development Environment) compilers such as Microsoft Visual C++, Borland C++ Builder etc. the processes discussed here quite transparent. The commands and examples of the gcc, gdb, g++, gas and friends are discussed in Module000 and Module111. Have a nice day! Ability ▪ Able to understand and appreciate the processes involved in preprocessing, compiling, linking, loading and running C / C++ programs. W.1 COMPILERS, ASSEMBLERS and LINKERS - Normally the C’s program building process involves four stages and utilizes different ‘tools’ such as a preprocessor, compiler, assembler, and linker. - At the end there should be a single executable file. Below are the stages that happen in order regardless of the operating system/compiler and graphically illustrated in Figure w.1. 1. Preprocessing is the first pass of any C compilation. It processes include-files, conditional compilation instructions and macros. 2. Compilation is the second pass. It takes the output of the preprocessor, and the source code, and generates assembler source code. 3. Assembly is ...
-
Publié par
-
Langue
English