title: Generating a.out file format with GCC
body: <p>How do I generate the a.out file format with GCC on x86 architectures?</p>
  <p>With <a href="https://en.wikipedia.org/wiki/Netwide_Assembler" rel="nofollow noreferrer">NASM</a> I can do this easily with the <em>-f</em> flag, for example:</p>
  <pre class="lang-none prettyprint-override"><code>nasm -f aout start.asm
  objdump -a start.o
  
  start.o:     file format a.out-i386-linux
  start.o
  </code></pre>
  <p>On Linux, compiling .c files produces an ELF object file. How can I produce <em>a.out</em> files with GCC?</p>