How is return address specified in stack?

后端 未结 4 695
耶瑟儿~
耶瑟儿~ 2021-01-02 09:19

This is what I see by disassemble for the statement function(1,2,3);:

movl   $0x3,0x8(%esp)
movl   $0x2,0x4(%esp)
movl   $0x1,(%esp)
call   0x40         


        
4条回答
  •  余生分开走
    2021-01-02 09:32

    It depends on the ABI and the architecture, but if the return address does end up on the stack it's a side-effect of the call instruction that puts it there.

提交回复
热议问题