(一)
预处理器、编译器、汇编器和链接器
gcc命令编译运行C语言:
Preprocessing phase: Converts the *.c file into a *.i pre-processed C program.
Compile phase: Compiles the *.i file into the assembly code *.S file.
Assembly phase: Converts the *.s file into a *.O binary target code file.
Link stage: Convert the *.O file to an executable file.
Generate executable file: Convert *.o to executable file.
Executes executable C language files.
(ii) Target documents:three different forms:
- relocatable files (used to create the following two types of files with other object files) ——. o file
- Execute the file (indicating where the execution should begin)
- Shared files (mostly. So files, used by link editors and dynamic linker links)
(iii) Relocatable target files
Elf format
(iv) Static library links
(v) Executable target file
(vi) dynamic Link shared library
(vii) Tools for processing target documents
AR: Create a static library, insert, delete, list, and extract members. STRINGS: Lists all printable strings in a destination file. STRIP: Removes the information from the target file for the symbol. NM: Lists the symbols defined in the symbol table for a target file. Size: The name and size of the section in the destination file. Readelf: Displays the complete structure of a target file, including all information encoded in the ELF header. Contains the size and NM features. OBJDUMP: The mother of all binary tools, capable of displaying all the information in a target file. Its biggest function is disassembly. The binary instruction in the text section. LDD: Lists the shared libraries that are required by an executable file at run time.
"In-depth understanding of computer Systems" chapter Seventh study Summary