title: Why can jmpq jump to a address different from GDB's hint on Mac OS X?
body: <p>0x0000000149ab0d2c  &lt;+0000>  jmpq   *0x1e04b6(%rip)        # 0x149c911e8</p>
  
  <p>(gdb) p $rip
  $1 = (void (*)(void)) 0x149ab0d2c </p>
  
  <p>(gdb) p $rip+6+0x1e04b6
  $4 = (void (*)(void)) 0x149c911e8</p>
  
  <p>after stepi: (It should be at 0x149c911e8 then, however...)</p>
  
  <p>(gdb) p $rip
  $5 = (void (*)(void)) 0x148c46d4a</p>
  
  <p>btw, my environment is Mac OS X 10.6.4. The program loads 2 dylibs, both of which link to the same static library compiled with the -fPIC option. This issue confuses the dylibs and make one of them call functions in another one, which shouldn't, since they're actually independent with each other.</p>