Useful all term

Useful commands

Things you’ll probably forget and want a reminder for:

  • Look at the contents of any file
      hexdump -C filename
    
  • Compile a C program
      gcc -Wall -Werror -g -o [executable-name] [source-file.c ...]
    

    (we will add some other command-line options later in the term).

  • Compile a C file to an object module (this produces “source-file.o”)
      gcc -Wall -Werror -g -c source-file.c
    
  • Translate an executable or object module to assembly language
      objdump -d obj-module