1 | #include <stdio.h> |
---|---|
2 | #include <stdlib.h> |
3 | |
4 | void Dtor() { printf(format: "destructor\n"); } |
5 | |
6 | int Ctor() { |
7 | printf(format: "constructor\n"); |
8 | atexit(func: Dtor); |
9 | return 0; |
10 | } |
11 | |
12 | #pragma section(".CRT$XIV", long, read) |
13 | __declspec(allocate(".CRT$XIV")) int (*i1)(void) = Ctor; |