forked from Imagelibrary/rtems
moxie/moxiesim: Remove __main()
Moxie has .init section and that is what handles the constructors.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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) ();
|
||||
}
|
||||
Reference in New Issue
Block a user