Dumping the PDB I can see that there are references to global constructors (so they are generated):
Code: Select all
0x1006 | LF_FUNC_ID [size = 48, hash = 0x38C6C]
name = `dynamic initializer for 'g_test', type = 0x102E, parent scope = <no type>
0x10B3 | LF_FUNC_ID [size = 52, hash = 0x2B878]
name = metal::`dynamic initializer for 'g_log', type = 0x102E, parent scope = <no type>
5976 | S_LPROCREF [size = 48] ``dynamic initializer for 'g_test'`
module = 1, sum name = 0, offset = 236
11592 | S_LPROCREF [size = 56] `metal::`dynamic initializer for 'g_log'`
module = 11, sum name = 0, offset = 52
6244 | S_GDATA32 [size = 24] `g_test`
type = 0x1033 (Test), addr = 0003:0032
11916 | S_GDATA32 [size = 28] `metal::g_log`
type = 0x119E (metal::LogSystem), addr = 0003:1032
What I cannot find is a way to run them on entry. The googles are not working today. Any idea?