Substitutes for x86 assembly 'call' instruction?

后端 未结 3 1005
既然无缘
既然无缘 2020-12-08 11:00

What are some alternatives to the x86 call instruction? Maybe something like a push of the return address then a jump?

Also is their a command for obtaining the curr

3条回答
  •  没有蜡笔的小新
    2020-12-08 11:57

    If I don't get something mixed up I would say it depends. As you can see here there are near and far calls, but let's just consider the near call. There are again two possibilities

    E8  # relative
    FF 
    # absolute

    whereas FF means an absolute "jump" and E8 indeed means relative to current eip.

    So if you have e.g.

    E8 32 45 ab 6f
    

    which means

    call 0x3245ab6f
    

    This would translate to

    push %eip
    add $0x3245ab6f, %eip
    

    and not

    push %eip
    jmp $0x3245ab6f
    

提交回复
热议问题