且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用"裸QUOT;属性在GCC的功能

更新时间:2022-05-10 08:14:43

如果您在赤裸裸的功能做的唯一事情是调用另一个函数,你可以只使用一个单一的JMP机code指令。

If the only thing you do in the naked function is call another function you can just use a single JMP machine code instruction.

您跳转到该函数将有一个有效的序幕,它应该直接返回赤裸裸的函数的调用者,因为JMP不会在堆栈上推回邮地址。

The function you jump to will have a valid prologue and it should return directly to the caller of the naked function since JMP doesn't push a return address on the stack.