summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/v850/shared/crt1.c
blob: 02a8a7f8cfdf4526177479892587eaf9c7667020 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * From newlib ==> libc/sys/sysnecv850/crt1.c
 *
 * Obtained from newlib: 29 May 2012
 * Warnings fixed: 7 October 2014
 */

void __main(void);
typedef void (*pfunc) (void);
extern pfunc __ctors[];
extern pfunc __ctors_end[];

void __main(void)
{
  static int initialized;
  if (! initialized)
    {
      pfunc *p;

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

    }
}