title: basic assembly not working on Mac (x86_64+Lion)?
body: <p>here is the code(exit.s):</p>
  
  <pre><code>.section .data,
  .section .text,
  .globl _start
  _start:
      movl $1, %eax
      movl $32, %ebx
      syscall
  </code></pre>
  
  <p>when I execute <code>" as exit.s -o exit.o &amp;&amp; ld exit.o -o exit -e _start &amp;&amp; ./exit"</code></p>
  
  <p>the return is "Bus error: 10" and the output of "<code>echo $?</code>" is 138</p>
  
  <p>I also tried the example of the correct answer in this question: <a href="https://stackoverflow.com/questions/3730064/process-command-line-in-linux-64-bit">Process command line in Linux 64 bit</a></p>
  
  <p>stil get "bus error"...</p>