Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Prepares an image for hotpatching.
Syntax
/hotpatch
Note
This option is only available for x86
Remarks
When /hotpatch is used during compilation, the compiler ensures that the first instruction of each function is at least 2 bytes long and that no jump within the function goes to the first instruction. These conditions are required for hotpatching.
To complete the preparation for making an image hotpatchable, after you compile with /hotpatch, use /functionpadmin to link. When you compile and link an image using one invocation of cl.exe, /hotpatch implies /functionpadmin.
Tip
Arm64 and x64 architectures are always treated as hotpatchable. But you must still link by using /functionpadmin to create hotpatchable images for them.
To set this compiler option in the Visual Studio development environment
- Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
- Select the Configuration Properties > C/C++ > Command Line property page.
- Add the compiler option to the Additional Options box.
To set this compiler option programmatically
- See AdditionalOptions.