CS61C@UCB | Computer Architecture
HD: Memo Hierarchy


SW: Process, Thread, Program Memory

Here “a program” means a running C program (with the main function as the entrance)
Home | CS 61C Fall 2022
Compiler Stages * 5
- lexical analysis: source code → tokens
- syntax analysis: analyzed tokens structures → AST (Abstract Syntax Tree)
- semantic analysis
- intermediate code generation
- code optimization & code generation
G++ Example: GCC Compilation Process
GCC and Make - A Tutorial on how to compile, link and build C/C++ applications

library linking
- static - in the form of
.a or .lib (in windows), machine code is copied into the executable.
- dynamic (shared library) -
.so or .dll files. Only a small table of machine code is copied into the executable, and one copy of the precompiled library serves all running programs.