summaryrefslogtreecommitdiffstats
path: root/newlib/libc/sys/h8300hms/crt1.c
blob: bd4ccf2d8b4e28db88f86dea6e89a4d2084957e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
void __main ()
{
#ifndef __ELF__
  static int initialized;
  if (! initialized)
    {
      typedef void (*pfunc) ();
      extern pfunc __ctors[];
      extern pfunc __ctors_end[];
      pfunc *p;

      initialized = 1;
      for (p = __ctors_end; p > __ctors; )
	(*--p) ();

    }
#endif
}