title: Nasm - Symbol `printf' causes overflow in R_X86_64_PC32 relocation
body: <p>I am trying to create a simple program in nasm that should display the letter <code>a</code>. however, It is giving me a Segfault and saying this: </p>
  
  <pre><code>./a.out: Symbol `printf' causes overflow in R_X86_64_PC32 relocation
  Segmentation fault (core dumped)
  </code></pre>
  
  <p>Basically, I am trying to move the value <code>0x61</code> (hex for letter a) into memory address 1234, and then pass that as an argument to printf. Here is my exact code:</p>
  
  <pre><code>extern printf
  section .text
  global main
  main:
  push rbp
  mov rax,0
  mov qword [1234], 0x61 ; move 0x61 into address 1234
  mov rdi, qword [1234] ; mov address 1234 into rdi
  call printf ; should print the letter a
  pop rbp
  mov rax,0
  ret
  </code></pre>
  
  <p>I am running Linux x86_64</p>