cpp, gcc, as

So you wrote it in C and it compiled.... but what is compilation?

The next few sections are absolutely sadistic, but you will learn so much. Work through it at your own pace, using Google, textbooks, and the #course_hardstuff channel in Slack. Don't get discouraged!

http://cs-fundamentals.com/c-programming/how-to-compile-c-program-using-gcc.php

  1. Use cpp to convert your source code .c to a .i file.

  2. Then use gcc to convert your .i file into a .s file.

  3. Then use as to convert your .s file into a .o binary.

What still needs to be done to get a .o binary to execute?

Task:

  • Submit text discussing anything that you struggled with and didn't understand, and what you did to overcome that problem. Include all the commands you ran. If you still don't understand, tell us what specifically you did not understand.