在装配code中的返回地址 [英] The return address in the assembly code

查看:151
本文介绍了在装配code中的返回地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

组装code是这样的:

The assembly code goes like this:

  call next
next:
  popl %eax

调用next ,返回地址将被压入堆栈,右后认为?但是,在上述code,有什么返回地址?

I thought after call next, the return address will be pushed onto the stack, right? But in the above code, what's the return address?

推荐答案

这code后执行%eax中都会有标签的下一个地址

After that code executes %eax will have the address of label "next"


  1. 呼叫分支到这恰好是下一条顺序指令和将返回地址,这始终是下一个顺序指令的地址的目标

  2. 的popl会弹出从堆栈中的返回地址到%EAX寄存器

净效果是%EAX指向标签下一个

The net effect is %eax points to label "next"

这篇关于在装配code中的返回地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆