Jav*_*efi 2 c assembly gcc instructions self-modifying
我想在获取下一条指令之前修改它,在foo 函数中的这篇文章的最佳答案中,*p指向 main 函数中的下一条指令。我想修改where*p指向的内容。例如我想将下一条指令更改为跳转指令。我怎样才能做到这一点?
void foo()
{
void** p = search((void**)&p, __builtin_return_address(0));
// modify content of where *p points at.
}
int main()
{
foo();
//next instruction. *p points here
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我想在 intel Core-i7 3632QM 处理器上使用 gcc 编译器来执行此操作。
| 归档时间: |
|
| 查看次数: |
547 次 |
| 最近记录: |