moxie/moxiesim: Remove __main()

Moxie has .init section and that is what handles the constructors.
This commit is contained in:
Joel Sherrill
2014-10-16 10:57:42 -05:00
parent 863559abbb
commit 94a54ae187
2 changed files with 1 additions and 22 deletions

View File

@@ -34,7 +34,7 @@ libbsp_a_SOURCES += ../../shared/bspclean.c ../../shared/bsplibc.c \
../../shared/bsppredriverhook.c ../../shared/bsppretaskinghook.c \
../../shared/bspgetworkarea.c ../../shared/bsppost.c \
../../shared/bspstart.c ../../shared/bootcard.c ../../shared/sbrk.c \
../../shared/gnatinstallhandler.c startup/__main.c
../../shared/gnatinstallhandler.c
# clock
libbsp_a_SOURCES += ../../shared/clock_driver_simidle.c
# console

View File

@@ -1,21 +0,0 @@
/*
* COPYRIGHT (c) 2011 Anthony Green <green@moxielogic.com>
*
*/
typedef void (*pfunc) (void);
extern pfunc __ctors[];
extern pfunc __ctors_end[];
void __main (void)
{
static int initialized;
pfunc *p;
if (initialized)
return;
initialized = 1;
for (p = __ctors_end; p > __ctors; )
(*--p) ();
}