Reading RIP register gives next instruction's address?

后端 未结 2 1095
清酒与你
清酒与你 2021-01-24 23:54

I try to read the value of x86_64 register rip. Here is what objdump shows.

4017ec: 48 8d 35 00 00 00 00  lea    0x0(%rip),%rsi
4017f3:         


        
2条回答
  •  生来不讨喜
    2021-01-25 00:51

    rip always hold the address of the next instruction while running the current instruction. If fact updating rip by the address of the next instruction, is part of the execution process of the current instruction.

提交回复
热议问题