reactos/sdk/lib/ucrt/vcruntime/initializers.cpp
Timo Kreuzer 9c887efa0e [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.
2025-01-26 18:08:55 +02:00

22 lines
595 B
C++

//
// 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")