title: Mach-O 64-bit format does not support 32-bit absolute addresses. NASM
body: <p>When I use <code>nasm -f macho64 asm1.asm</code> I get the following error:</p>
  
  <blockquote>
    <p>asm1.asm:14: error: Mach-O 64-bit format does not support 32-bit absolute addresses</p>
  </blockquote>
  
  <p>This is <code>asm1.asm</code></p>
  
  <pre><code>SECTION .data           ;initialized data
  
  msg: db "Hello world, this is assembly", 10, 0
  
  SECTION .text           ;asm code
  
  extern printf
  global _main
  
  _main:
      push rbp
      mov rbp, rsp
  
      push msg
      call printf
  
      mov rsp, rbp
      pop rbp
      ret
  </code></pre>
  
  <p>I'm really new to assembly and barely know what these commands do. Any idea what's wrong here?</p>