init_seg

Controls the order in which initialization code is executed.

Syntax

pragma init_seg( compiler | lib | user | "name")

Targets
Intel x86
Remarks

This pragma controls the order in which initialization code is executed. The initialization code for a C++ compiled module calls constructors for any statically declared objects. For C, no initialization code is generated.

The order of initialization is:

If you specify the name of a segment, a pointer to the initialization code is placed in the designated segment. In this case, the initialization code is not called automatically; you must call it explicitly.