mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:13:06 +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
|
@ -27,6 +27,7 @@ extern "C" {
|
|||
#define _CRTALLOC(x) __attribute__((section(x)))
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma section(".CRT$XIC", long, read)
|
||||
#pragma section(".CRT$XPX", long, read)
|
||||
#pragma section(".CRT$XPXA", long, read)
|
||||
|
@ -39,6 +40,7 @@ extern "C" {
|
|||
#pragma section(".CRT$XPZ", long, read)
|
||||
#pragma section(".CRT$XTA", long, read)
|
||||
#pragma section(".CRT$XTZ", long, read)
|
||||
#endif
|
||||
|
||||
extern _PIFV __xi_a[];
|
||||
extern _PIFV __xi_z[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue