title: Why can `%rip + displacement` access data section?
body: <p>The usage of this is that I saw after used <code>gcc -S</code>.</p>
  <p>I know <code>ary</code> represents the first address of the sequence, then I also know <code>leaq ary(, %rdi, 4)</code> has the same effect(assume %rdi equals 0).</p>
  <p>But I don't understand, why can <code>ary(%rip)</code> access data section. Maybe I lack <strong>the memory layout for program running, or I misunderstand <a href="https://en.wikibooks.org/wiki/X86_Assembly/GNU_assembly_syntax#Address_operand_syntax" rel="nofollow noreferrer">the addressing modes</a></strong>?</p>
  <p>Below is my example.</p>
  <pre><code>.section .data
  ary:
      .int 1, 2, 3, 4, 5, 6
  
  .section .text
  .globl  _start
  
  _start:
      leaq ary, %rax
      leaq ary(%rip), %rbx   # ???
  
      movq $60, %rax
      syscall
  </code></pre>