Compile C
4-steps
- pre-processing
- compilation
- assembly
- linking
Types of Object Files
- Executable object file
- Relocatable object file
- Shared object file
- Core file
Formats of Object Files
- a.out
- initial version of UNIX
- COFF
- SVR3 UNIX
- PE
- Win. NT
- ELF
- SVR4 Linux
ELF format of a program
ELF Header |
---|
Program Header Table |
.text |
.rodata |
.data |
.bss |
.symtab |
.rel.text |
.rel.data |
.debug |
.line |
.strtab |
Section Header Table |
可參考: http://ccckmit.wikidot.com/lk:elf
Process
Instance of a program running on a computer
Process Control Block
task_struct
- Process Identification
- PID, PPID, SID, UID, EUID..
- Process State Information
- Process Control Information