2๏ธโฃBinary Analysis
4 Stages of Compilation

1. Preprocessing

#include<stdio.h>
#define FORMAT_STRING "%s"
#define MESSAGE "Hello, world!\n"
int main(int argc, char **agrv)
{
printf(FORMAT_STRING, MESSAGE);
return 0;
}$ gcc -E -P <test.c>-E: Preprocess only; do not compile, assemble or link.
2. Compilation

$ gcc -S -masm=intel test.c 3. Assembly

$ gcc -c test.c$ file test.oLinking

gcc <test.c>file a.outLast updated
Was this helpful?