| title | /CETCOMPAT (CET Shadow Stack compatible) | ||
|---|---|---|---|
| ms.date | 09/01/2020 | ||
| f1_keywords |
|
||
| helpviewer_keywords |
|
Specifies whether to mark an executable image as compatible with Control-flow Enforcement Technology (CET) Shadow Stack.
/CETCOMPAT
/CETCOMPAT:NO
NO
Specifies that the executable shouldn't be marked compatible with CET Shadow Stack.
Control-flow Enforcement Technology (CET) Shadow Stack is a computer processor feature that provides capabilities to defend against return-oriented programming (ROP) based malware attacks. For more information, see Intel Control-flow Enforcement Technology Preview.
The /CETCOMPAT linker option tells the linker to mark the binary as CET Shadow Stack-compatible. /CETCOMPAT:NO marks the binary as not compatible with CET Shadow Stack. If both options are specified on the command line, the last one specified is used. This switch is currently only applicable to x86 and x64 architectures.
The /CETCOMPAT option is available beginning in Visual Studio 2019.
Starting in Visual Studio 2019 version 16.7:
-
Open the Property Pages dialog box for the project. For more information, see Working with Project Properties.
-
Select the Configuration Properties > Linker > Advanced property page.
-
Select the CET Shadow Stack Compatible property.
-
In the dropdown control, choose
Yes (/CETCOMPAT)to mark the binary as CET Shadow Stack compatible , orNo (/CETCOMPAT:NO)to mark it as non-compatible.
In previous versions of Visual Studio 2019:
-
Open the Property Pages dialog box for the project. For more information, see Working with Project Properties.
-
Select the Configuration Properties > Linker > Command Line property page.
-
In the Additional Options edit control, add
/CETCOMPATto mark the binary as CET Shadow Stack compatible, or/CETCOMPAT:NOto explicitly mark it as non-compatible.
This option doesn't have a programmatic equivalent.