[rtems commit] moxie/moxiesim: Remove __main()

Joel Sherrill joel at rtems.org
Sun Oct 19 21:51:56 UTC 2014


Module:    rtems
Branch:    master
Commit:    94a54ae1877646e126844f879000dc7dc5e5f80f
Changeset: http://git.rtems.org/rtems/commit/?id=94a54ae1877646e126844f879000dc7dc5e5f80f

Author:    Joel Sherrill <joel.sherrill at oarcorp.com>
Date:      Thu Oct 16 10:57:42 2014 -0500

moxie/moxiesim: Remove __main()

Moxie has .init section and that is what handles the constructors.

---

 c/src/lib/libbsp/moxie/moxiesim/Makefile.am      |    2 +-
 c/src/lib/libbsp/moxie/moxiesim/startup/__main.c |   21 ---------------------
 2 files changed, 1 insertions(+), 22 deletions(-)

diff --git a/c/src/lib/libbsp/moxie/moxiesim/Makefile.am b/c/src/lib/libbsp/moxie/moxiesim/Makefile.am
index b109664..2d04f11 100644
--- a/c/src/lib/libbsp/moxie/moxiesim/Makefile.am
+++ b/c/src/lib/libbsp/moxie/moxiesim/Makefile.am
@@ -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
diff --git a/c/src/lib/libbsp/moxie/moxiesim/startup/__main.c b/c/src/lib/libbsp/moxie/moxiesim/startup/__main.c
deleted file mode 100644
index ffe8b55..0000000
--- a/c/src/lib/libbsp/moxie/moxiesim/startup/__main.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- *  COPYRIGHT (c) 2011 Anthony Green <green at 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) ();
-}



More information about the vc mailing list