mirror of
https://github.com/reactos/reactos.git
synced 2025-06-25 19:59:54 +00:00
[UCRT:VCRUNTIME] Add initializer sections
Use #pragma section only for MSVC (and Clang-cl), because Clang doesn't like allocating non-const variables in a read-only section, while GCC doesn't understand these pragmas and ignores them.
This commit is contained in:
parent
4198ceb83a
commit
9c887efa0e
3 changed files with 25 additions and 0 deletions
22
sdk/lib/ucrt/vcruntime/initializers.cpp
Normal file
22
sdk/lib/ucrt/vcruntime/initializers.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
//
|
||||
// section_markers.c
|
||||
//
|
||||
// Copyright (c) 2024 Timo Kreuzer
|
||||
//
|
||||
// Markers for CRT initializer sections.
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
//
|
||||
|
||||
#include <internal_shared.h>
|
||||
|
||||
_CRTALLOC(".CRT$XIA") _PIFV __xi_a[] = { 0 };
|
||||
_CRTALLOC(".CRT$XIZ") _PIFV __xi_z[] = { 0 };
|
||||
_CRTALLOC(".CRT$XCA") _PVFV __xc_a[] = { 0 };
|
||||
_CRTALLOC(".CRT$XCZ") _PVFV __xc_z[] = { 0 };
|
||||
_CRTALLOC(".CRT$XPA") _PVFV __xp_a[] = { 0 };
|
||||
_CRTALLOC(".CRT$XPZ") _PVFV __xp_z[] = { 0 };
|
||||
_CRTALLOC(".CRT$XTA") _PVFV __xt_a[] = { 0 };
|
||||
_CRTALLOC(".CRT$XTZ") _PVFV __xt_z[] = { 0 };
|
||||
|
||||
#pragma comment(linker, "/merge:.CRT=.rdata")
|
Loading…
Add table
Add a link
Reference in a new issue