title: Why is a function executed from the same memory address each time?
body: <p>I'm disassembling an executable:</p>
  
  <pre><code>(gdb) disas main
  Dump of assembler code for function main:
  0x004012d0 &lt;main+0&gt;:    push   %ebp
  0x004012d1 &lt;main+1&gt;:    mov    %esp,%ebp
  ...
  </code></pre>
  
  <p>Each time the memory address is the same:<code>0x004012d0</code>.</p>
  
  <p>Isn't the memory address to be dynamically assigned by the OS?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Now I see it's virtual space,and it can be randomized on some platforms.</p>
  
  <p>Can someone post a gdb dump that changes ?</p>