Last updated 9 months ago
#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.
$ gcc -S -masm=intel test.c
$ gcc -c test.c
$ file test.o
Note: Relocatable means you are dealing with an object file and not with an executable file.
Relocatable
gcc <test.c>
file a.out