Does MSVC/Win32 guarantee function start address is aligned

独自空忆成欢 提交于 2019-12-11 23:28:01

问题


This question is about hotpatching. The core of hotpatching is to replace the first two bytes instruction with a two bytes short jump instruction. Microsoft guarantees the first instruction of a hotpatchable function is at least two bytes. Let's call it hotpatch point.

To ensure the replacing operation is an atomic operation, the address of the hotpatch point must be at least 16-bit aligned, MSDN says nothing about this.

So my question is: Does MSVC/Win32 guarantee function start address is aligned ?

来源:https://stackoverflow.com/questions/34215820/does-msvc-win32-guarantee-function-start-address-is-aligned

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!