summaryrefslogtreecommitdiffstats
path: root/bsps/v850
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-23 12:04:31 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-04-23 15:18:45 +0200
commit4ccbac630705ac0a94b377434131e6121b1733d2 (patch)
tree07e097da0d6cc51cfbc96016b6568d41a5d5ecd7 /bsps/v850
parentbsps/sparc64: Move helenos to bsps (diff)
downloadrtems-4ccbac630705ac0a94b377434131e6121b1733d2.tar.bz2
bsps/v850: Move crt1.c to bsps
This patch is a part of the BSP source reorganization. Update #3285.
Diffstat (limited to 'bsps/v850')
-rw-r--r--bsps/v850/shared/start/crt1.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/bsps/v850/shared/start/crt1.c b/bsps/v850/shared/start/crt1.c
new file mode 100644
index 0000000000..02a8a7f8cf
--- /dev/null
+++ b/bsps/v850/shared/start/crt1.c
@@ -0,0 +1,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) ();
+
+ }
+}