Skip to content

Commit d2ceafd

Browse files
authored
Merge pull request #5021 from MicrosoftDocs/main
8/29/2023 10:30 AM Publish
2 parents 2f8a4bb + 6e4223f commit d2ceafd

File tree

4 files changed

+47
-8
lines changed

4 files changed

+47
-8
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
description: "Learn more about: /KERNEL (Create kernel mode binary)."
3+
title: /KERNEL
4+
ms.date: "08/25/2023"
5+
---
6+
# /KERNEL (Create kernel mode binary)
7+
8+
Create a binary that is suitable for running in kernel mode.
9+
10+
## Syntax
11+
12+
> **`/KERNEL`**
13+
14+
## Remarks
15+
16+
Causes the linker to emit a warning if any object file or library linked in the binary wasn't compiled with [/kernel](kernel-create-kernel-mode-binary.md).
17+
18+
Code that can run in kernel mode must be compiled with the **`/kernel`** option. If you link a binary that contains code that wasn't compiled with **`/kernel`**, the binary might not run correctly in kernel mode.
19+
20+
Code for kernel mode is compiled with a simplified set of C++ language features that are specific to code that runs in kernel mode. The compiler produces warnings for C++ language features that are potentially disruptive but can't be disabled. For more information about compiling code in kernel mode, see [/kernel (Create kernel mode binary)](kernel-create-kernel-mode-binary.md).
21+
22+
### To set this linker option in Visual Studio
23+
24+
1. Open the project **Property Pages** dialog box. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
25+
26+
1. Select the **Configuration Properties** > **Linker** > **Command Line** property page.
27+
28+
1. In **Additional Options**, enter `/KERNELMODE`.
29+
30+
## See also
31+
32+
- [MSVC linker reference](linking.md)
33+
- [MSVC linker options](linker-options.md)
34+
- [Compiler options: /kernel](kernel-create-kernel-mode-binary.md)

docs/build/reference/linker-options.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
---
22
title: "MSVC Linker options"
33
description: "A list of the options supported by the Microsoft LINK linker."
4-
ms.date: 09/27/2022
4+
ms.date: 08/25/2023
55
f1_keywords: ["link"]
66
helpviewer_keywords: ["linker [C++]", "linker [C++], options listed", "libraries [C++], linking to COFF", "LINK tool [C++], linker options"]
7-
ms.assetid: c1d51b8a-bd23-416d-81e4-900e02b2c129
87
---
98
# Linker options
109

@@ -13,11 +12,8 @@ LINK.exe links Common Object File Format (COFF) object files and libraries to cr
1312
The following table lists options for LINK.exe. For more information about LINK, see:
1413

1514
- [Compiler-controlled LINK options](compiler-controlled-link-options.md)
16-
1715
- [LINK input files](link-input-files.md)
18-
1916
- [LINK output](link-output.md)
20-
2117
- [Reserved words](reserved-words.md)
2218

2319
On the command line, linker options aren't case-sensitive; for example, `/base` and `/BASE` mean the same thing. For details on how to specify each option on the command line or in Visual Studio, see the documentation for that option.
@@ -43,7 +39,7 @@ You can use the [`comment`](../../preprocessor/comment-c-cpp.md) pragma to speci
4339
| [`/CLRIMAGETYPE`](clrimagetype-specify-type-of-clr-image.md) | Sets the type (IJW, pure, or safe) of a CLR image. |
4440
| [`/CLRSUPPORTLASTERROR`](clrsupportlasterror-preserve-last-error-code-for-pinvoke-calls.md) | Preserves the last error code of functions that are called through the P/Invoke mechanism. |
4541
| [`/CLRTHREADATTRIBUTE`](clrthreadattribute-set-clr-thread-attribute.md) | Specifies the threading attribute to apply to the entry point of your CLR program. |
46-
| [`/CLRUNMANAGEDCODECHECK`](clrunmanagedcodecheck-add-suppressunmanagedcodesecurityattribute.md) | Specifies whether the linker will apply the `SuppressUnmanagedCodeSecurity` attribute to linker-generated P/Invoke stubs that call from managed code into native DLLs. |
42+
| [`/CLRUNMANAGEDCODECHECK`](clrunmanagedcodecheck-add-suppressunmanagedcodesecurityattribute.md) | Specifies whether the linker applies the `SuppressUnmanagedCodeSecurity` attribute to linker-generated P/Invoke stubs that call from managed code into native DLLs. |
4743
| [`/DEBUG`](debug-generate-debug-info.md) | Creates debugging information. |
4844
| [`/DEBUGTYPE`](debugtype-debug-info-options.md) | Specifies which data to include in debugging information. |
4945
| [`/DEF`](def-specify-module-definition-file.md) | Passes a module-definition (.def) file to the linker. |
@@ -75,6 +71,7 @@ You can use the [`comment`](../../preprocessor/comment-c-cpp.md) pragma to speci
7571
| [`/INCREMENTAL`](incremental-link-incrementally.md) | Controls incremental linking. |
7672
| [`/INFERASANLIBS`](inferasanlibs.md) | Uses inferred sanitizer libraries. |
7773
| [`/INTEGRITYCHECK`](integritycheck-require-signature-check.md) | Specifies that the module requires a signature check at load time. |
74+
| [`/KERNEL`](link-code-for-kernel-mode.md) | Create a kernel mode binary. |
7875
| [`/KEYCONTAINER`](keycontainer-specify-a-key-container-to-sign-an-assembly.md) | Specifies a key container to sign an assembly. |
7976
| [`/KEYFILE`](keyfile-specify-key-or-key-pair-to-sign-an-assembly.md) | Specifies a key or key pair to sign an assembly. |
8077
| [`/LARGEADDRESSAWARE`](largeaddressaware-handle-large-addresses.md) | Tells the compiler that the application supports addresses larger than 2 gigabytes |

docs/build/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,8 @@ items:
997997
href: ../build/reference/inferasanlibs.md
998998
- name: /INTEGRITYCHECK (Require signature check)
999999
href: ../build/reference/integritycheck-require-signature-check.md
1000+
- name: /KERNEL (Create a kernel mode binary)
1001+
href: ../build/reference/link-code-for-kernel-mode.md
10001002
- name: /KEYCONTAINER (Specify a key container to sign an assembly)
10011003
href: ../build/reference/keycontainer-specify-a-key-container-to-sign-an-assembly.md
10021004
- name: /KEYFILE (Specify key or key pair to sign an assembly)

docs/overview/what-s-new-for-visual-cpp-in-visual-studio.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,17 @@ For more information on what's new in all of Visual Studio, see [What's new in V
1616

1717
For a summary of new C++ features in Visual Studio 17.7, see [What’s New for C++ Developers in Visual Studio 2022 17.7](https://devblogs.microsoft.com/cppblog/whats-new-for-c-developers-in-visual-studio-2022-17-7/).
1818

19-
Briefly, some of the new features are: faster debugging sessions and faster project load times, step-by-step visualization of macro expansion, one-click download for Windows Subsystem for Linux (WSL), improved support for Doxygen comments, C++ Build Insights for game development, and Unreal Engine project improvements such as faster IntelliSense and syntax colorization, the ability to find all Unreal Engine Blueprint references, and more.
19+
Briefly, some of the new features are:
20+
* Faster debugging sessions and faster project load times
21+
* Step-by-step visualization of macro expansion
22+
* One-click download for Windows Subsystem for Linux (WSL)
23+
* Improved support for Doxygen comments
24+
* C++ Build Insights for game development
25+
* Unreal Engine project improvements such as faster IntelliSense and syntax colorization, the ability to find all Unreal Engine Blueprint references, and more.
2026

2127
For a summary of new C++ features that are specific to game development, see [Unleashing the Power of Visual Studio 2022 for C++ Game Development](https://devblogs.microsoft.com/visualstudio/unleashing-the-power-of-visual-studio-2022-for-c-game-development/#:~:text=Unleashing%20the%20Power%20of%20Visual%20Studio%202022%20for,6%20Optimizing%20Build%20Times%20in%20Visual%20Studio%20)
2228

23-
For a summary of new features in the Visual Studio 17.7 IDE, see[Visual Studio 2022 version 17.7 Release Notes](/visualstudio/releases/2022/release-notes).
29+
For a summary of new features in the Visual Studio 17.7 IDE, see [Visual Studio 2022 version 17.7 Release Notes](/visualstudio/releases/2022/release-notes).
2430

2531
## What's new for C++ in Visual Studio version 17.6
2632

0 commit comments

Comments
 (0)