title: How to generate plain binaries like nasm -f bin with the GNU GAS assembler?
body: <p>I have some NASM files that generally have the structure:</p>
  
  <pre><code>        [BITS 64]
          [ORG 0x0000000000200000]
  
  start:
          ...
  
          ret
  </code></pre>
  
  <p>I'm assembling them like so:</p>
  
  <pre><code>nasm -f bin abc.asm
  </code></pre>
  
  <p>I'd like to write some of these using GAS instead. Two questions:</p>
  
  <ul>
  <li><p>What directives should I use in GAS? I've found the '.org' directive but GAS doesn't seem to have a '.bits' directive.</p></li>
  <li><p>What should I pass to <code>gcc</code> or <code>as</code> to generate a plain binary file? I.e. what the <code>-f bin</code> option does with NASM.</p></li>
  </ul>