Prev: bit-hacks Next: c-to-assembly
There are 4 stages to turn source code into a binary:
clang -E main.i)
). This expands
macros.clang -S main.s)
). This turns code into
assembly.clang -c main.o
). This turns code into
objects.ld main
). This creates the main
executable.-g
) allows you to
produce a disassembly of the code.Why look at assembly?
Your computer’s instruction set architecture (ISA) has four main concepts:
Prev: bit-hacks Next: c-to-assembly