Skip to content

Commit 38c7345

Browse files
TylerMSFTTylerMSFT
authored andcommitted
fix github4706-add reference to init function
1 parent 7120177 commit 38c7345

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docs/c-runtime-library/crt-initialization.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ description: "Describes how the CRT initializes global state in native code."
44
ms.topic: "conceptual"
55
ms.date: 08/02/2021
66
helpviewer_keywords: ["CRT initialization [C++]"]
7-
ms.assetid: e7979813-1856-4848-9639-f29c86b74ad7
87
---
98
# CRT initialization
109

@@ -16,9 +15,9 @@ It's possible, though not recommended, to take advantage of Microsoft-specific l
1615

1716
## Initializing a global object
1817

19-
Consider the following code:
18+
Consider the following C++ code (C won't allow this code because it doesn't allow a function call in a constant expression).
2019

21-
```C
20+
```cpp
2221
int func(void)
2322
{
2423
return 3;
@@ -69,7 +68,6 @@ Offset Type Applied To Index Name
6968
The CRT defines two pointers:
7069

7170
- `__xc_a` in `.CRT$XCA`
72-
7371
- `__xc_z` in `.CRT$XCZ`
7472

7573
Neither group has any other symbols defined except `__xc_a` and `__xc_z`.
@@ -88,7 +86,7 @@ The section should resemble this example:
8886
__xc_z
8987
```
9088

91-
So, the CRT library uses both `__xc_a` and `__xc_z` to determine the start and end of the global initializers list because of the way in which they're laid out in memory after the image is loaded.
89+
The CRT library uses both `__xc_a` and `__xc_z` to determine the start and end of the global initializers list because of the way in which they're laid out in memory after the image is loaded.
9290

9391
## Linker features for initialization
9492

@@ -112,4 +110,5 @@ The names `.CRT$XCT` and `.CRT$XCV` aren't used by either the compiler or the CR
112110
113111
## See also
114112
113+
[`_initterm, _initterm_e`](./reference/initterm-initterm-e.md)\
115114
[C runtime (CRT) and C++ Standard Library (STL) `.lib` files](./crt-library-features.md)

0 commit comments

Comments
 (0)