#if OS_LINUX

extern SyType(SYMBOL_SET_DEFINE) SY__FIRST(SYMBOL_SET_DEFINE);
extern SyType(SYMBOL_SET_DEFINE) SY__OPL(SYMBOL_SET_DEFINE);
// (these symbols are resolved in the linker script)

#elif OS_WINDOWS

#if COMPILER_CL
# pragma section(Glue(SYMBOL_SET_DEFINE,_section),read,write)
#endif

#if defined(SY__MAIN)

SyType(SYMBOL_SET_DEFINE) *SY__FIRST(SYMBOL_SET_DEFINE) = 0;
SyType(SYMBOL_SET_DEFINE) *SY__OPL(SYMBOL_SET_DEFINE) = 0;

MR4TH_BEFORE_MAIN(Glue(SYMBOL_SET_DEFINE,__init)){
  int size = sizeof(Glue(SYMBOL_SET_DEFINE,_section)) - 1;
  sy__section_init(Glue(SYMBOL_SET_DEFINE,_section), size,
                   (void**)&SY__FIRST(SYMBOL_SET_DEFINE),
                   (void**)&SY__OPL(SYMBOL_SET_DEFINE));
}

#else

extern SyType(SYMBOL_SET_DEFINE) *SY__FIRST(SYMBOL_SET_DEFINE);
extern SyType(SYMBOL_SET_DEFINE) *SY__OPL(SYMBOL_SET_DEFINE);

#endif

#else
# error mr4th_symbol_set.define not implemented for this OS
#endif

#undef SYMBOL_SET_DEFINE
